mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-23 05:58:28 -05:00
feat(cli-service): add stdin flag to build (#5376)
This commit is contained in:
committed by
GitHub
parent
5e93d70e65
commit
c64afc3c2a
@@ -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) {
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user