redundancyjs

0.1.0 • Public • Published

RedundancyJS

npm License GitHub last commit Maintenance

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

Readme

Keywords

Package Sidebar

Install

npm i redundancyjs

Weekly Downloads

65

Version

0.1.0

License

MIT

Unpacked Size

10.2 kB

Total Files

5

Last publish

Collaborators

  • hrueger