Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrueger/redundancyjs
A cli tool to copy code files programatically.
https://github.com/hrueger/redundancyjs
Last synced: 13 days ago
JSON representation
A cli tool to copy code files programatically.
- Host: GitHub
- URL: https://github.com/hrueger/redundancyjs
- Owner: hrueger
- License: mit
- Created: 2020-05-10T08:14:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T11:37:28.000Z (over 3 years ago)
- Last Synced: 2024-09-17T12:06:44.442Z (5 months ago)
- Language: JavaScript
- Size: 52.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# RedundancyJS
[![npm](https://img.shields.io/npm/v/redundancyjs)](https://npmjs.com/package/redundancyjs)
[![License](https://img.shields.io/badge/License-MIT-blue)](./LICENSE.md)
[![GitHub last commit](https://img.shields.io/github/last-commit/hrueger/redundancyjs?color=brightgreen)](https://github.com/hrueger/redundancyjs/commits)
[![Maintenance](https://img.shields.io/maintenance/yes/2021)](https://github.com/hrueger/redundancyjs/commits)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:
```json
{
"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:
```json
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/"
}]
}
```Remove TypeScript decorators:
```json
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"removeDecorators": true
}]
}
```Remove methods:
```json
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"removeMethods": ["myMethodName", "anotherMethod", "doThis"]
}]
}
```Remove imports:
```json
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"removeImports": ["coolPackage", "lodash"]
}]
}
```Change imported types from libraries to `any`:
```json
{
"version": 1,
"files": [{
"src": "api/src/entity/*.ts",
"dest": "frontend/src/app/_models/",
"changeInports": ["uncoolPackage"]
}]
}
```## License
MIT