如何在一个命令中 运行 nodemon 和 parcel watch
How to run nodemon and parcel watch in one command
我想在一个命令中启动 nodemon 和 watch:js 脚本? 运行 一个脚本命令中的两个脚本 - 这可能吗?找到的其他解决方案对我不起作用 ...
// package.json
"scripts": {
"start": "nodemon server.js",
"watch:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js"
}
您可以尝试这样做:
// 安装名为“concurrently”的节点包
npm 同时安装
之后在您的 package.json 文件中创建一个新脚本:
"dadScript": "同时 \"npm 运行 childScript1\" \"npm 运行 childScript2\""
对我来说,它可以同时启动反应客户端服务器和 node-express 服务器
我想在一个命令中启动 nodemon 和 watch:js 脚本? 运行 一个脚本命令中的两个脚本 - 这可能吗?找到的其他解决方案对我不起作用 ...
// package.json
"scripts": {
"start": "nodemon server.js",
"watch:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js"
}
您可以尝试这样做: // 安装名为“concurrently”的节点包
npm 同时安装
之后在您的 package.json 文件中创建一个新脚本:
"dadScript": "同时 \"npm 运行 childScript1\" \"npm 运行 childScript2\""
对我来说,它可以同时启动反应客户端服务器和 node-express 服务器