UNPKG

821 BJavaScriptView Raw
1'use strict'
2const EPILOG = `
3This command outputs two bundles, one in development mode (index.js) and another in production mode (index.min.js) plus respective source-maps, files are written to ./dist folder.
4Supports options forwarding with '--' for more info check https://webpack.js.org/api/cli/
5`
6module.exports = {
7 command: 'build',
8 desc: 'Builds browser bundles with Webpack.',
9 builder: (yargs) => {
10 yargs
11 .epilog(EPILOG)
12 .options({
13 bundlesize: {
14 alias: 'b',
15 type: 'boolean',
16 describe: 'Analyse bundle size. Default threshold is 100kB, you can override that in `.aegir.js` with the property `bundlesize.maxSize`.',
17 default: false
18 }
19 })
20 },
21 handler (argv) {
22 const build = require('../src/build')
23 return build(argv)
24 }
25}