Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkolt/ts-rename
Renames *.js files to *.mjs or *.cjs
https://github.com/pkolt/ts-rename
Last synced: 7 days ago
JSON representation
Renames *.js files to *.mjs or *.cjs
- Host: GitHub
- URL: https://github.com/pkolt/ts-rename
- Owner: pkolt
- License: mit
- Created: 2023-06-13T16:54:26.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-06-27T17:13:23.000Z (over 1 year ago)
- Last Synced: 2024-10-26T00:55:50.350Z (20 days ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ts-rename
Renames *.js files to *.mjs or *.cjs
This package solves the problem described in [issue](https://github.com/microsoft/TypeScript/issues/49462).
## Installation
```bash
npm i ts-rename
```## Usage
### Renaming ESM modules
**--esm**
```bash
ts-rename --esm ./dist/esm
```### Renaming CommonJS modules
**--cjs**
```bash
ts-rename --cjs ./dist/cjs
```### Recursive renaming
**--r, --recursive**
```bash
ts-rename --cjs -r ./dist/cjs
```### Verbose mode
**--verbose**
```bash
ts-rename --cjs -v ./dist/cjs
```### Show help
**-h, --help**
```bash
ts-rename -h
```## License
[MIT](LICENSE.md)