Skip to content

Commit

Permalink
feat(cli-service): add stdin flag to build (#5376)
Browse files Browse the repository at this point in the history
  • Loading branch information
trashpanda001 committed May 8, 2020
1 parent 5e93d70 commit c64afc3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/@vue/cli-service/lib/commands/build/index.js
Expand Up @@ -37,7 +37,8 @@ module.exports = (api, options) => {
'--report': `generate report.html to help analyze bundle content`,
'--report-json': 'generate report.json to help analyze bundle content',
'--skip-plugins': `comma-separated list of plugin names to skip for this run`,
'--watch': `watch for changes`
'--watch': `watch for changes`,
'--stdin': `close when stdin ends`
}
}, async (args, rawArgs) => {
for (const key in defaults) {
Expand Down Expand Up @@ -155,6 +156,13 @@ async function build (args, api, options) {
})
}

if (args.stdin) {
process.stdin.on('end', () => {
process.exit(0)
})
process.stdin.resume()
}

// Expose advanced stats
if (args.dashboard) {
const DashboardPlugin = require('../../webpack/DashboardPlugin')
Expand Down

0 comments on commit c64afc3

Please sign in to comment.