@startselect/js-bundler
v0.0.7
Published
Javascript bundler
Downloads
1
Maintainers
Readme
JS Bundler
This bundler has three main functionalities:
- Compile JS code and write it to the ./public/dist/ folder
- Watch for changes in the ./resources/assets/js/ folder
- Minifies code when using the --minify flag
How to use
Install using NPM: npm install @startselect/js-bundler
Install using Yarn: yarn add @startselect/js-bundler
Developmentnode ./node_modules/@startselect/js-bundler/src/cli.js build --target ./resources/assets/js/app.js --destination ./public/dist/app.js
Watchernode ./node_modules/@startselect/js-bundler/src/cli.js watch --target ./resources/assets/js/app.js --destination ./public/dist/app.js
Productionnode ./node_modules/@startselect/js-bundler/src/cli.js build --target ./resources/assets/js/app.js --destination ./public/dist/app.js --minify
Transform using babel
You can transform the output to support older browser by creating a .babelrc file which you should put in your project root. Example file:
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry"
}
]
]
}