Skip to content

Commit

Permalink
perf(main): Merge server-task
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinerer committed Aug 31, 2023
1 parent c8234b9 commit 03c93a5
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions packages/main/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,25 +131,16 @@ task('devServer', done => {
})

/**
* 👻 本地预览服务
*/
task('preview', done => {
const cliServe = getCliServeArgs(args)
if (!cliServe.port) {
cliServe.port = 8527
}
createServeTask('pipflowView')(_.merge({}, CC.server, cliServe), done)
})

/**
* 👻 本地服务
* 👻 本地 HTTP 服务
*/
task('server', done => {
const cliServe = getCliServeArgs(args)
createServeTask('pipflowServer')(_.merge({
const _defaults = args.preview ? { ...CC.server, port: 8527 } : {
port: 3000,
server: '.',
open: true
}, cliServe), done, null)
}
createServeTask('pipflowServer')(_.merge(_defaults, cliServe), done)
})

/**
Expand Down

0 comments on commit 03c93a5

Please sign in to comment.