Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)