Skip to content

magitek-telescope/degrade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

degrade

Installation

$ npm i -g degrade

How to Use

Refactor files

If the filename matches a glob pattern or "before", replace "before" with "after".

command: degrade rf <before> <after> '<glob>'

$ tree
.
└── src
    ├── baz.ts
    └── foo.ts
$ degrade rf foo bar './src/**.ts'
./src/foo.ts
$ tree
.
└── src
    ├── bar.ts
    └── baz.ts

Refactor text

Replace the string "before" in the file targeted by the glob pattern with "after".

$ cat ./src/bar.ts
console.log('ABC')
$ cat ./src/baz.ts
console.log('ABC')
$ degrade rt ABC DEF './src/bar.ts'
./src/bar.ts
$ cat ./src/bar.ts
console.log('DEF')
$ cat ./src/baz.ts
console.log('ABC')⏎

LICENCE

MIT

About

Better refactoring tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published