arloliu / copy-node-modules

Fast deploy Node.js modules from local source folder to distination folder
26 stars 14 forks source link

ES modules support #14

Closed ezze closed 5 years ago

ezze commented 5 years ago

This pull request ports all source code to ES6+ located in src directory.

Library files (including binary executable) are transpiled to ES5 (lib directory) with Babel and to ES module with Rollup. This resulting ES module is mentioned as jsnext:main and module properties of package.json allowing to use it in modern ES environments.

All library scripts are generated automatically on prepublishOnly.

In order to beautify a source code an airbnb code style is applied.

Also all dependencies are upgraded to their recent versions.

@arloliu, are these global changes fine for you? I think it's a good idea to enable Travis CI and provide some tests later.

arloliu commented 5 years ago

That's fine, I'll merge it and publish to npm.

ezze commented 5 years ago

src/bin is gone somehow but compiled bin is present in sources. I'll fix it now.

ezze commented 5 years ago

It was caused by .gitignore rule bin, changed it to /bin to ignore only top level directory. It's now in master so you can give it a try. Sorry for that.