From 13b516dccb0b1e445878852d0a781af5cbae6b40 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Mon, 26 Jul 2021 22:04:32 +0800 Subject: [PATCH] refactor: unify dev script --- package.json | 3 ++- packages/core/package.json | 2 +- packages/ui/package.json | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0d87d5256..691ec3a5e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "scripts": { "lerna": "lerna", "bootstrap": "lerna bootstrap", - "prepare": "husky install && lerna run --stream prepack" + "prepare": "husky install && lerna run --stream prepack", + "dev": "lerna run --stream prepack && lerna run --parallel dev" }, "devDependencies": { "@commitlint/cli": "^13.1.0", diff --git a/packages/core/package.json b/packages/core/package.json index d3d8eb7a4..d79697b5c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,7 +10,7 @@ "precommit": "lint-staged", "build": "rm -rf build/ && tsc", "lint": "eslint --format pretty --ext .ts src", - "dev": "rm -rf build/ && tsc-watch --onSuccess \"node ./build/index.js\"" + "dev": "rm -rf build/ && tsc-watch --preserveWatchOutput --onSuccess \"node ./build/index.js\"" }, "dependencies": { "@logto/essentials": "^1.1.0-rc.1", diff --git a/packages/ui/package.json b/packages/ui/package.json index bde22deb8..9f681191c 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -7,8 +7,8 @@ "precommit": "lint-staged", "dev:tsc": "tsc -b -w --preserveWatchOutput", "dev:razzle": "razzle start", - "start": "PORT=5000 concurrently -c \"blue,cyan\" \"yarn:dev:tsc\" -k \"yarn:dev:razzle\"", - "start:prod": "NODE_ENV=production node build/server.js", + "dev": "PORT=5000 concurrently -c \"blue,cyan\" \"yarn:dev:tsc\" -k \"yarn:dev:razzle\"", + "start": "NODE_ENV=production node build/server.js", "build": "tsc -b && razzle build --noninteractive", "lint": "eslint --format pretty --ext .ts --ext .tsx src", "stylelint": "stylelint \"src/**/*.scss\"",