Skip to content

Commit

Permalink
feat(webpack): set title via cli args
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Feb 10, 2016
1 parent 694f24c commit 915bf15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module.exports = function (type, options) {
],
plugins: [
new HtmlWebpackPlugin(Object.assign({}, {
title: 'Tooling',
title: options.title || 'Tooling',
template: dir('lib/index.jade'),
inject: false
}, toolingConfig.index))
Expand Down
2 changes: 2 additions & 0 deletions tooling
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ program
.option('-s, --silent', 'Do not open browser window')
.option('-u, --use [usePresetsFor]', 'Use presets for React or Vue or the default config')
.option('--ai, --auto-install', 'Automatically install missing dependencies when editing')
.option('--title [htmlTitle]', 'Set title for output html')
.action(watch)

program
.command('build')
.option('-e, --entry [webpackEntry]', 'Set webpack entry"')
.option('-u, --use [usePresetsFor]', 'Use presets for React or Vue')
.option('--title [htmlTitle]', 'Set title for output html')
.action(build)

program.parse(process.argv)

0 comments on commit 915bf15

Please sign in to comment.