update dev.sh
This commit is contained in:
parent
200a53fafc
commit
4e8caf4c53
23
dev.ps1
23
dev.ps1
@ -1,16 +1,7 @@
|
||||
# 定义颜色变量
|
||||
$PINK = "$([char]27)[33m"
|
||||
$GREEN = "$([char]27)[32m"
|
||||
$NC = "$([char]27)[0m"
|
||||
|
||||
Start-Job -ScriptBlock {
|
||||
cd renderer
|
||||
npm run serve | ForEach-Object { "$using:PINK[renderer]$using:NC $_" }
|
||||
}
|
||||
|
||||
Start-Job -ScriptBlock {
|
||||
cd service
|
||||
npm run serve | ForEach-Object { "$using:GREEN[service]$using:NC $_" }
|
||||
}
|
||||
|
||||
Get-Job | Wait-Job | Receive-Job -Wait
|
||||
npx concurrently `
|
||||
-n "renderer,service" `
|
||||
-p " {name} " `
|
||||
-c "black.bgBlue,black.bgGreen" `
|
||||
--kill-others `
|
||||
"cd renderer && npm run serve" `
|
||||
"cd service && npm run serve"
|
17
dev.sh
17
dev.sh
@ -1,12 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 定义颜色变量(使用 -e 选项的 echo 时)
|
||||
PINK=$'\033[33m'
|
||||
GREEN=$'\033[32m'
|
||||
NC=$'\033[0m'
|
||||
|
||||
(cd renderer && npm run serve | while read -r line; do echo -e "${PINK}[renderer]${NC} $line"; done) &
|
||||
|
||||
(cd service && npm run serve | while read -r line; do echo -e "${GREEN}[service]${NC} $line"; done) &
|
||||
|
||||
wait
|
||||
npx concurrently \
|
||||
-n "renderer,service" \
|
||||
-p " {name} " \
|
||||
-c "black.bgBlue,black.bgGreen" \
|
||||
--kill-others \
|
||||
"cd renderer && npm run serve" \
|
||||
"cd service && npm run serve"
|
Loading…
x
Reference in New Issue
Block a user