Skip to content

Commit c64afc3

Browse files
feat(cli-service): add stdin flag to build (#5376)
1 parent 5e93d70 commit c64afc3

File tree

1 file changed

+9
-1
lines changed
  • packages/@vue/cli-service/lib/commands/build

1 file changed

+9
-1
lines changed

packages/@vue/cli-service/lib/commands/build/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ module.exports = (api, options) => {
3737
'--report': `generate report.html to help analyze bundle content`,
3838
'--report-json': 'generate report.json to help analyze bundle content',
3939
'--skip-plugins': `comma-separated list of plugin names to skip for this run`,
40-
'--watch': `watch for changes`
40+
'--watch': `watch for changes`,
41+
'--stdin': `close when stdin ends`
4142
}
4243
}, async (args, rawArgs) => {
4344
for (const key in defaults) {
@@ -155,6 +156,13 @@ async function build (args, api, options) {
155156
})
156157
}
157158

159+
if (args.stdin) {
160+
process.stdin.on('end', () => {
161+
process.exit(0)
162+
})
163+
process.stdin.resume()
164+
}
165+
158166
// Expose advanced stats
159167
if (args.dashboard) {
160168
const DashboardPlugin = require('../../webpack/DashboardPlugin')

0 commit comments

Comments
 (0)