Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leobalter/rocambole-method-rename
Tool to rename method names in JS files through Rocambole
https://github.com/leobalter/rocambole-method-rename
Last synced: about 2 months ago
JSON representation
Tool to rename method names in JS files through Rocambole
- Host: GitHub
- URL: https://github.com/leobalter/rocambole-method-rename
- Owner: leobalter
- Created: 2014-05-24T06:30:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-26T02:13:39.000Z (over 10 years ago)
- Last Synced: 2024-10-14T12:54:34.932Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 281 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rocambole Method Rename
A tool to rename method names in JS files through [Rocambole](https://github.com/millermedeiros/rocambole).
[![Build Status](https://travis-ci.org/leobalter/rocambole-method-rename.svg)](https://travis-ci.org/leobalter/rocambole-method-rename)
## Instalation:
```sh
$ npm install rocambole-method-rename
```## Usage example
```js
// TL;DR, it returns a string
require( "rocambole-method-rename" )( src, "oldMethodName", "newMethodName" );
```### Other:
```js
(function() {
var path = require( "path" ),
rmr = require( "rocambole-method-rename" ),
src = path.join( __dirname, "source.js" ).toString(),
result;// Sends JS Contents
// Returns a string with the replaced content
result = rmr( src, "oldMethodName", "newMethodName" );
})();
```## Contributing
Issues and PRs are very welcome!
Please write tests with new features.
**Grunt!**