chore: fix build process in dev mode (#835)

This commit is contained in:
Nolan Lawson 2018-12-17 22:42:39 -08:00 committed by GitHub
parent 93c2358a71
commit 943a1ed5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -94,9 +94,10 @@ async function buildAll () {
}
async function main () {
await buildAll()
if (process.argv.includes('--watch')) {
doWatch()
} else {
await buildAll()
}
}

View File

@ -5,7 +5,8 @@
"scripts": {
"lint": "standard && standard --plugin html 'src/routes/**/*.html'",
"lint-fix": "standard --fix && standard --fix --plugin html 'src/routes/**/*.html'",
"dev": "run-p --race build-template-html-watch sapper-dev",
"dev": "run-s build-template-html serve-dev",
"serve-dev": "run-p --race build-template-html-watch sapper-dev",
"sapper-dev": "cross-env NODE_ENV=development PORT=4002 sapper dev",
"sapper-prod": "cross-env PORT=4002 node __sapper__/build",
"build": "cross-env NODE_ENV=production npm run build-steps",