如何在 Yarn 包中并发使用?
How to use concurrently in Yarn package?
我系统中的默认包管理器是 Yarn。我正在尝试学习使用 NPM 的课程。我没有转向 NPM,而是想继续使用 Yarn,但我同时陷入了困境。如何为 Yarn 转换以下代码?
"start": "node backend/server",
"server": "nodemon backend/server",
"client": "npm start --prefix frontend",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"data:import": "node backend/seeder",
"data:destroy": "node backend/seeder -d",
以上代码的纱线版本为:
"start": "node backend/server",
"server": "nodemon backend/server",
"client": "yarn --cwd frontend start",
"dev": "concurrently \"yarn server\" \"yarn client\"",
"data:import": "node backend/seeder",
"data:destroy": "node backend/seeder -d"
CWD - 当前工作目录
我系统中的默认包管理器是 Yarn。我正在尝试学习使用 NPM 的课程。我没有转向 NPM,而是想继续使用 Yarn,但我同时陷入了困境。如何为 Yarn 转换以下代码?
"start": "node backend/server",
"server": "nodemon backend/server",
"client": "npm start --prefix frontend",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"data:import": "node backend/seeder",
"data:destroy": "node backend/seeder -d",
以上代码的纱线版本为:
"start": "node backend/server",
"server": "nodemon backend/server",
"client": "yarn --cwd frontend start",
"dev": "concurrently \"yarn server\" \"yarn client\"",
"data:import": "node backend/seeder",
"data:destroy": "node backend/seeder -d"
CWD - 当前工作目录