remodulate

0.0.1 • Public • Published

remodulate [WORK IN PROGRESS]

Convert ES2015 modules to CommonJS modules (and vice versa?)

Usage

npx remodulate [any jscodeshift options] <your files>

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.

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 imports

CJS -> ESM

  • [ ] namespace imports
  • [ ] named exports
  • [ ] named imports
  • [ ] default exports
  • [ ] default imports

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    1

Package Sidebar

Install

npm i remodulate

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

6.4 kB

Total Files

7

Last publish

Collaborators

  • wmhilton