Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/billiegoose/remodulate
Convert ES2015 modules to CommonJS modules (and vice versa?)
https://github.com/billiegoose/remodulate
Last synced: 24 days ago
JSON representation
Convert ES2015 modules to CommonJS modules (and vice versa?)
- Host: GitHub
- URL: https://github.com/billiegoose/remodulate
- Owner: billiegoose
- License: mit
- Created: 2018-11-20T17:57:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T06:21:47.000Z (about 6 years ago)
- Last Synced: 2024-04-23T23:14:58.003Z (9 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remodulate [WORK IN PROGRESS]
Convert ES2015 modules to CommonJS modules (and vice versa?)## Usage
```sh
npx remodulate [any jscodeshift options]
```Use the `-d` option for a dry-run and use `-dp` to print the output for comparison without overwriting the originals. See all available [jscodeshift options](https://github.com/facebook/jscodeshift#usage-cli).
### Test
Clone, `npm install`, and run `npm test` to transform the files in `./examples` into `./output`## TODO
ESM -> CJS
- [x] namespace imports
- [x] named exports
- [x] named imports
- [x] default exports
- [x] default importsCJS -> ESM
- [ ] namespace imports
- [ ] named exports
- [ ] named imports
- [ ] default exports
- [ ] default imports