0.0.1 • Published 5 years ago

remodulate v0.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

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

  • namespace imports
  • named exports
  • named imports
  • default exports
  • default imports

CJS -> ESM

  • namespace imports
  • named exports
  • named imports
  • default exports
  • default imports