npm-run-all
npm-run-all
npm scripts
https://www.npmjs.com/package/npm-run-all
A CLI tool to run multiple npm-scripts in parallel or sequential.
$ yarn add npm-run-all
# or
$ npm i npm-run-all
https://github.com/mysticatea/npm-run-all
$ npm-run-all -h
Usage:
$ npm-run-all [--help | -h | --version | -v]
$ npm-run-all [tasks] [OPTIONS]
Run given npm-scripts in parallel or sequential.
<tasks> : A list of npm-scripts' names and Glob-like patterns.
Options:
--aggregate-output - - - Avoid interleaving output by delaying printing of
each command's output until it has finished.
-c, --continue-on-error - Set the flag to continue executing
other/subsequent tasks even if a task threw an
error. 'npm-run-all' itself will exit with
non-zero code if one or more tasks threw error(s)
--max-parallel <number> - Set the maximum number of parallelism. Default is
unlimited.
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable npm_execpath.
If the variable is not defined, then it's "npm."
In this case, the "npm" command must be found in
environment variable PATH.
-l, --print-label - - - - Set the flag to print the task name as a prefix
on each line of output. Tools in tasks may stop
coloring their output if this option was given.
-n, --print-name - - - - Set the flag to print the task name before
running each task.
-p, --parallel <tasks> - Run a group of tasks in parallel.
e.g. 'npm-run-all -p foo bar' is similar to
'npm run foo & npm run bar'.
-r, --race - - - - - - - Set the flag to kill all tasks when a task
finished with zero. This option is valid only
with 'parallel' option.
-s, --sequential <tasks> - Run a group of tasks sequentially.
--serial <tasks> e.g. 'npm-run-all -s foo bar' is similar to
'npm run foo && npm run bar'.
'--serial' is a synonym of '--sequential'.
--silent - - - - - - - - Set 'silent' to the log level of npm.
Examples:
$ npm-run-all --serial clean lint build:**
$ npm-run-all --parallel watch:**
$ npm-run-all clean lint --parallel "build:** -- --watch"
$ npm-run-all -l -p start-server start-browser start-electron
React SSR
{
"name": "react-ssr-app",
"version": "1.0.1",
"private": true,
"author": "xgqfrms",
"license": "MIT",
"esm-type": "module",
"scripts": {
"dev:build-server": "NODE_ENV=development webpack --config webpack.server.js --mode=development -w",
"dev:start": "nodemon ./server-build/index.js",
"dev": "npm-run-all --parallel build dev:*",
"server:dev": "node --experimental-modules server/index.mjs",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"express": "^4.17.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-scripts": "3.4.3"
},
"devDependencies": {
"@babel/core": "^7.12.0",
"@babel/preset-env": "^7.12.0",
"@babel/preset-react": "^7.10.4",
"babel-loader": "^8.1.0",
"nodemon": "^2.0.5",
"npm-run-all": "^4.1.5",
"webpack": "4.42.0",
"webpack-cli": "^4.0.0",
"webpack-node-externals": "^2.5.2"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
refs
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
npm-run-all的更多相关文章
- 在package.json中配置Script执行npm run tslint报错问题
今天在学习tslint的时候,按照git clone下angular2-webpack-starter的代码执行npm run lint时,虽然代码进行了检测,但检测完成后npm始终报错, //pac ...
- [Whole Web] [Node.js] Using npm run to launch local scripts
npm run allows you to configure scripts inside of your package.json file which can access locally in ...
- 执行 npm run update-webdriver 提示文件不能获取错误
按照angularjs官网的入门教程中输入 npm run update-webdriver 总是提示 https://chromedriver.storage.googleapis.com/2.1 ...
- vue-cli 官方模板webpack-simple的npm run dev 与npm run bulid的一些问题
npm run dev命令后并不会在dist目录下生成build.js文件,开发环境下build.js是在运行内存中的. 在package.json的scripts属性的dev后面加上--port 8 ...
- 关于vue-clidown到本地后,拷贝文件库到另外一台电脑上npm run dev编译报错的处理
这些天自己在用vue-cli项目,在家里的电脑下下来后写了一些demo,拿到公司继续开发的时候发现删除node_modules文件,运行npm install和npm run 百度,搜狗了好久都没有找 ...
- npm run build生成路径问题
vue项目中可以使用npm run build 命令生成静态文件夹dist,开发者可以直接点击dist文件夹下面的index.html问价来访问自己的项目,但是用vue-cli生成的项目,当运行npm ...
- VUE-CLI Vue安装及开发,npm run build无法查看项目的问题
Vue-cli 本地安装vue项目 需要安装node.js,用node命令行npm的方式安装Vue 步骤: 1.进入项目地址安装 npm install vue-cli -g 2.初始化一下 ESli ...
- vuejs中执行npm run dev出现页面cannot GET/问题
1.问题描述 最近用vue-cli搭建了一个小项目,其中在对项目进行打包测试时修改了webpack.base.conf.js中的配置信息,之后再用npm run dev之后出现如下的情况: 最近又有网 ...
- 使用vue框架运行npm run dev 时报错解决
使用使用vue框架运行npm run dev 时报错 如下: 原因: localhost:8080 有可能其他软件占用了,导致其他问题的出现 我们可以动态修改地址 解决: 进入项目文件的config文 ...
- Electron 桌面应用打包(npm run build)简述(windows + mac)
最近一段时间在用electron+vue做内部项目的一键构建发布系统的桌面应用,现就其中打包流程写个备注,以示记录. Windows环境打包:1.首先贴一下package.json. { " ...
随机推荐
- wordpress迁移报错
背景: 因为一些原因迁移wordpress的博客.备份好数据库和网站源码到另一台生产环境上线的时候报错: Warning: require(/www/wwwroot/pazzn/wp-includes ...
- Java实现QQ邮件发送客户端
目录 一.前言:QQ邮件发送程序 二.封装SMTP操作 三.实现多线程接收 四.QQ邮件客户端界面设计 1.连接按钮 2.发送按钮 五.QQ邮件发送效果演示 六.总结 一.前言:QQ邮件发送程序 在上 ...
- (003)每日SQL学习:普通视图和物化视图
关于这一点一直就是很懵懂的状态,今天特意网上查了一下资料,以下摘抄网上比较好的答案.以作记录. 普通视图和物化视图的区别答曰:普通视图和物化视图根本就不是一个东西,说区别都是硬拼到一起的,首先明白基本 ...
- Go for Pythonistas Go and the Zen of Python 禅
Go for Pythonistas https://talks.golang.org/2013/go4python.slide#1 Things I don't like about Python ...
- Communicating sequential processes CSP 通信顺序进程 CSP writing to a file by name (process, Erlang) vs. writing to a file descriptor (channel, Go)
the-way-to-go_ZH_CN/01.2.md at master · Unknwon/the-way-to-go_ZH_CN https://github.com/Unknwon/the-w ...
- (十六)配置多数据源,整合MybatisPlus增强插件
配置多数据源,整合MybatisPlus增强插件 多数据简介 MybatisPlus简介 1.案例实现 1.1 项目结构 1.2 多数据源配置 1.3 参数扫描类 1.4 配置Druid连接池 1.5 ...
- SpringCloud及其组件详解
SpringCloud及其组件详解 1.Spring Cloud 1.1 Spring Cloud和Dubbo的区别图解 1.2 微服务的技术栈 2.Spring Cloud 概述 2.1 Sprin ...
- ThinkPHP 漏洞利用
ThinkPHP thinkphp_5x_命令执行漏洞 受影响版本包括5.0和5.1版本 docker漏洞环境源码: https://github.com/vulnspy/thinkphp-5.1.2 ...
- Django(中间件)
中间件的概念 中间件顾名思义,是介于request与response处理之间的一道处理过程,相对比较轻量级,并且在全局上改变django的输入与输出.因为改变的是全局,所以需要谨慎实用,用不好会影响到 ...
- 搭建tdh平台
1.卸载tdh平台(见tdh集群卸载文件夹) 在manager节点执行chmod +x uninstall.sh (非root用户执行sudo chmod +x uninstall.sh)开始卸载TD ...