UNPKG

@roots/bud

Version:

Configurable, extensible build tools for modern single and multi-page web applications

26 lines (25 loc) 742 B
import BudCommand from '@roots/bud/cli/commands'; import { Command, Option } from '@roots/bud-support/clipanion'; /** * `bud webpack` command */ export default class BudWebpackCommand extends BudCommand { static paths = [[`webpack`]]; static usage = Command.Usage({ category: `tool`, description: `Webpack CLI passthrough`, examples: [[`Run webpack`, `$0 webpack`]], }); /** * Command options */ options = Option.Proxy({ name: `webpack passthrough options` }); /** * {@link Command.execute} */ async execute() { await this.makeBud(); await this.bud.run().catch(e => { }); await this.run([`webpack`, `bin`, `webpack.js`], this.options); } }