npm link & run npm script
npm link & run npm script
https://blog.csdn.net/juhaotian/article/details/78672390
npm link命令可以将一个任意位置的npm包链接到全局执行环境,从而在任意位置使用命令行都可以直接运行该npm包。
app-cmd.cmd
#!/usr/bin/env node
echo "666" && npm run app
package.json
{
"scripts": {
"app": "npm run rmrf-all && webpack -p",
"dev": "npm run rmrf && webpack -p -w",
"prod": "webpack -p",
"rmrf": "rimraf build/js && rimraf build/css",
"rmrf-all": "rimraf build/*",
"page": "cd modules && browser-sync start --server --files './*.html'",
"index": "cd build && browser-sync start --server --files './index.html'",
"test": "cd src && browser-sync start --server --files './*.*'"
},
"private": true,
"bin": {
"app": "app-shell",
"cmd": "app-cmd"
},
}
npm
https://docs.npmjs.com/cli/link
https://docs.npmjs.com/cli/run-script
https://docs.npmjs.com/misc/scripts
symbolic link
https://en.wikipedia.org/wiki/Symbolic_link
npm link

https://docs.npmjs.com/cli/link
https://segmentfault.com/a/1190000016208716#articleHeader2
npm link & run npm script的更多相关文章
- 使用npm link 加速调试
我们在把包发布到npm上时,如果需要对本地的包进行修改,我们需要改变一个版本,重新发布.然后测试时需要更新这个包进行测试.这样的话,每一次的调试都特别麻烦.我们可以使用npm link来加速这个调试过 ...
- npm link的作用
语法: 1. 在一个包目录下npm link (把当前的包目录软连接到global folder里面,把二进制文件也软连接到global的bin里面 这个prefix可以用npm config ls ...
- [Node.js] Using npm link to use node modules that are "in progress"
It is some times convenient, even necessary, to make use of a module that you are working on before ...
- 使用npm link 创建本地模块
1. npm link 介绍 创建一个全局的符号链接,优点是方便我们进行本地node模块的开发调用,和后期发布私服,或者npm 仓库调用是一致的 以下为官方的说明: First, npm link i ...
- [NPM] Test npm packages locally in another project using npm link
We will import our newly published package into a new project locally to make sure everything is wor ...
- 未解决:found 1 high severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details
问题出现: 在通过 `ng new hello-world` 命令新建项目时,项目出现以下警告: found high severity vulnerability run `npm audit fi ...
- npm link 安装本地模块,将本地模块cli化
第三方学习地址 http://mp.weixin.qq.com/s?__biz=MzAxMTU0NTc4Nw==&mid=2661157390&idx=1&sn=6d96e54 ...
- [已解决]This dependency was not found: * common/stylus/index.styl in ./src/main.js To install it, you can run: npm install --save common/stylus/index.styl
出现 This dependency was not found: * common/stylus/index.styl in ./src/main.js To install it, you can ...
- npm link & unlink
npm link & unlink https://dev.to/erinbush/npm-linking-and-unlinking-2h1g
随机推荐
- APP自动化测试
CTS工具,主要是基于Androidinstrumentation和JUnit测试原理推单元测试用例: Monkey用来对UI进行压力测试,伪随机的模拟用户的按键输入,触摸屏输入,手势输入等: ASE ...
- JavaScript_5_对象
1. JavaScrip中所有事物都是对象:字符串.数字.日期.等等 2. 在javaScripe中,对象是拥有属性和方法的数据 <!DOCTYPE html> <html> ...
- POJ 1185 炮兵阵地 (状压DP,轮廓线DP)
题意: 给一个n*m的矩阵,每个格子中有'P'或者'H',分别表示平地和高原,平地可以摆放大炮,而大炮的攻击范围在4个方向都是2格(除了自身位置),攻击范围内不能有其他炮,问最多能放多少个炮?(n&l ...
- MySQL安装未响应解决方法
安装MySQL出示未响应,一般显示在安装MySQL程序最后2步的3,4项就不动了. 这种情况一般是你以前安装过MySQL数据库服务项被占用了. 1.卸载MySQL 2.删除安装目录及数据存放目录 3. ...
- superset docker 部署
公众号原文有更多效果图哦 一.使用自己的数据库 1. 拉取项目 // 创建目录用于存放项目 mkdir -p /mnt/superset cd /mnt/superset git clone http ...
- 怎样将Oracle数据库设置为归档模式及非归档模式
怎样将Oracle数据库设置为归档模式及非归档模式 1.Oracle日志分类 分三大类: Alert log files--警报日志,Trace files--跟踪日志(用户和进程)和 redo lo ...
- Python学习记录4(语句)
赋值语句 序列解包 条件语句 语句块 布尔变量 条件执行和if语句 条件运算符 循环 while语句 for循环 迭代工具 跳出循环 break continue while truebreak语句 ...
- FFT快速傅里叶变化
纪念人生第一次FFT 前排感谢iamzky,讲解非常详细 #include<iostream> #include<cstdio> #include<cmath> u ...
- PHPStorm+XDebug进行调试图文教程
这篇文章主要为大家详细介绍了PHPStorm+XDebug进行调试图文教程,内容很丰富,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 另外如果你们加载不出图片,另外的地址:转载地址https:// ...
- JDBC-防止SQL注入问题
String sql = "select * from user where name = '" + name + "' and password = '" ...