https://github.com/hendrixgotcodes/refactor
A light weight CLI tool designed to make developers more robust in refactoring large codebase.
https://github.com/hendrixgotcodes/refactor
cli command-line command-line-tool open-source refactoring rename rename-files
Last synced: about 1 year ago
JSON representation
A light weight CLI tool designed to make developers more robust in refactoring large codebase.
- Host: GitHub
- URL: https://github.com/hendrixgotcodes/refactor
- Owner: hendrixgotcodes
- License: mit
- Created: 2022-06-02T16:23:09.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-13T10:23:05.000Z (almost 4 years ago)
- Last Synced: 2025-01-22T06:37:15.864Z (over 1 year ago)
- Topics: cli, command-line, command-line-tool, open-source, refactoring, rename, rename-files
- Language: TypeScript
- Homepage:
- Size: 356 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **REFACTOR**

A light weight CLI tool designed to make developers more robust in refactoring large codebase.
- Change extensions of multiple files with just one command
- Rename multiple files much more faster than the traditional way
- Rename multiple directories
*🧪Refactor is in it's early stages and it is strictly experimental. Your contributions and suggestions are more than welcome*
## Installation
### Using npm
To install this CLI using npm run;
>npm install refactor -g
This will install the CLI and make it globally available.
## Commands
There are currently two main commands. One comes with several options which enables you two perform more sophisticated tasks.
| Command | Description |
| ------- | -------------------------------|
| about | Prints general info about the CLI unto the console |
| rename | This one does the magic. It takes in different arguments depending on the sort of operation you want to perform |
| help | Use this command whenever you forget the two other commands |
## Usage
### about
You can use the about command as so;
> refactor about
This general info about the CLI unto the console.
### rename
The rename command takes the following form.
> refactor rename --[arg1] --[arg2] --[etc]
The arguments are as followed
- --path: The path to the directory of operation. This argument is always demanded.
Example usage:
`refactor rename --path="."`
type: *string* | required: *true*
- --file: Consider this argument as toggler. Set it to true if you want to perform the operation on files, false if directories.
Example usage:
`refactor rename --path="." --file=true`
type: *string* | required: *true*
- fromExt: The file extension you want to change. Used alongside --toExt argument.
Example usage:
`refactor rename --path="." --file=true --fromExt="js" --toExt="ts"`
type: *string* | required: *if *--file* is set to true*
- toExt: The final extension you want for your files. Used alongside --fromExt argument.
Example usage:
`refactor rename --path="." --file=true --fromExt="js" --toExt="ts"`
type: *string* | required: *if *--file* is set to true*
- exclude: Use this argument incase you have some files you want to exclude from the operation.
Example usage:
`refactor rename --path="." --file=true --fromExt="js" --toExt="ts" --exclude="a.js, b.js, c.js"`