@webscaffold/task-js-compiler
v0.1.0-alpha.7
Published
@webscaffold js compiler task (Webpack, Babel)
Downloads
22
Readme
@web-scaffold/task-js-compiler
WEB Scaffold
task for bundling js, running Webpack with Babel.
Install
$ npm install --save-dev @webscaffold/task-js-compiler
Usage
const jsCompiler = require('@webscaffold/task-js-compiler');
await jsCompiler(webpackConfigObj);
This will run Webpack based on the config passed.
API
jsCompiler(webpackConfig, options?)
Returns a Promise with the webpack instance and stats object.
webpackConfig
Type: object
Webpack config object.
options
Type: object
Options object that can be passed.
taskName
Type: string
Default: js-compiler
Task name that will be used by the logger to namespace the logs.
taskColor
Type: string
Default: #00a8e8
The color used by the logger to log to the console the task output.
eventBus
Type: object
Default: undefined
The EventEmitter event bus that will be used to emit bs:reload
for Browsersync.
Licensing
MIT © Radu Micu