Nothing Special   »   [go: up one dir, main page]

Skip to content

A language agnostic, code-style aware, refactoring/renaming tool.

License

Notifications You must be signed in to change notification settings

bm371613/refren

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

refren: refactor/rename

Build Status

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.

Simple example

$ 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
}

Using together with the find command

refren can be easily used together with the find command:

$ find src -name "*.js" | xargs refren "JS example" "javascript dummy"

Installation

cargo install refren

About

A language agnostic, code-style aware, refactoring/renaming tool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages