| Crates.io | refren |
| lib.rs | refren |
| version | 0.1.0 |
| created_at | 2018-10-23 15:08:35.985911+00 |
| updated_at | 2018-10-23 15:08:35.985911+00 |
| description | A language agnostic, code-style aware, refactoring/renaming tool. |
| homepage | https://github.com/bm371613/refren |
| repository | https://github.com/bm371613/refren |
| max_upload_size | |
| id | 92176 |
| size | 20,935 |
The refren command facilitates refactoring/renaming in cases when you want to rename a concept that appears in your
code rather than a specific variable or class. So, if you decide that "JS example" should be renamed to
"javascript dummy", refren will do it for you, aware of different code styles.
$ cat src/lib.js
const JS_EXAMPLE_STATIC_CONST = 44
function jsExampleFunction(firstJsExampleArgument, secondJsExampleArgument) {
}
module.exports = {
jsExampleFunction
}
$ cat src/lib.js | refren 'JS example' 'javascript dummy'
const JAVASCRIPT_DUMMY_STATIC_CONST = null
function javascriptDummyFunction(firstJavascriptDummyArgument, secondJavascriptDummyArgument) {
}
module.exports = {
javascriptDummyFunction
}
find commandrefren can be easily used together with the find command:
$ find src -name "*.js" | xargs refren "JS example" "javascript dummy"