JS bundling can be a really complicated thing, but Rollup can make it easier.
This generator will help you to quickly get started with Rollup.
npm install -g yo npm install -g generator-rollup-config
Create a new directory for your project:
mkdir my-new-project cd my-new-project
Now you can install and configure Rollup with:
Rollup-config will always install and configure: rollup, rollup-plugin-node-resolve, rollup-plugin-commonjs, rollup-plugin-amd, rollup-watch.
Additionally it may provide code transpilation (buble or babel), plugins for working with some JS frameworks and basic support for different languages (Typescript, PureScript, CoffeeScript).
It's pretty straightforward, but remember that this generator creates a very simple configuration. You may want to modify the configuration files (.babelrc, rollup.config.js) and tweak them to your needs.
npm run build
Watch files for change:
npm run dev
You can run simple tests with:
Additionally you can check code with ESLint:
npm run eslint
MIT © Paweł Halczuk