redundancyjs
v1.0.0
Published
A cli tool to copy code files programatically.
Downloads
122
Readme
RedundancyJS
This is a simple and easy to use CLI to copy code files programatically.
Usage
Create a file called redundancy.json
in the root fodler of your project. It has to look like this:
{
"version": 1,
"files": [
{
"src": "AGtiv/src/app/data/ways.ts",
"dest": "api/src/data/"
}
]
}
Then, run npx redundancyjs
.
You can watch for changes and automatically copy the files with npx redundancyjs --watch
or npx redundancyjs -w
.
You can also copy multiple files:
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/"
}]
}
Remove TypeScript decorators:
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"removeDecorators": true
}]
}
Remove methods:
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"removeMethods": ["myMethodName", "anotherMethod", "doThis"]
}]
}
Remove imports:
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"removeImports": ["coolPackage", "lodash"]
}]
}
Change imported types from libraries to any
:
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"changeInports": ["uncoolPackage"]
}]
}
License
MIT