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
随机推荐
- linux基本命令及使用方法
shell环境: shell:命令解释器,是Linux 系统的用户界面,提供了用户与内核进行交互操作的一种接口,它接收用户输入的命令并把它送入内核去执行. bash:是GNU 计划中重要的工具软件之一 ...
- atoi 函数实现
要考虑的东西实在也挺多的.总结如下: 1 前面空格分隔符号的时候 2 第一个符号位处理+ - 3 遇到非数字字符退出 4 为正数的时候,大于INT_MAX上溢 5 为负数的时候 ...
- 吐槽在cocos2dx游戏接入腾讯信鸽的坑
腾讯信鸽是用来在后台推送消息给移动应用客户端使用,接入方法很简单,在信鸽官网注册个账号 http://xg.qq.com/xg,然后注册一个应用,在后台页面获得ACCESS ID, ACCESS KE ...
- ios sinaweibo 客户端(三)
这个页面要讲述的是用户的粉丝列表,下面是效果图: 可以看到这个视图明显也是一个tableview,在每一个cell中包含的有三个部分的内容:粉丝头像image,粉丝昵称label,我和粉丝之间的相互关 ...
- (75)zabbix_server.conf配置文件详解
############ GENERAL PARAMETERS ################# ### Option: ListenPort# Listen port for trapper.# ...
- linux系统防火墙关闭
临时关闭防火墙 #systemctl stop firewalld 永久关闭服务端防火墙 #systemctl disabled firewalld getenforce 查询状态 临时 ...
- Python + Bottle + 谷歌搜索Api 实现简单搜索引擎
1.运行环境 python3 centos7 2.Bottle的使用 使用bottle主要是因为它仅用python自带的库即可实现对web的搭建. bottle源码分析 bottle使用教程 3.代码 ...
- Golang Json测试
结构体是谷歌搜索API package main import ( "encoding/json" "fmt" "io/ioutil" &q ...
- Java-JFrame可视化开发
Java-JFrame可视化开发的一般步骤 JFrame可以做出类似于QQ登录功能的窗体,通过JFrame可以利用Java代码实现窗体功能,一般用于CS项目的C(客户端)的开发: 利用JFrame可以 ...
- 【android】【转发】Android中PX、DP、SP的区别
转载 http://blog.csdn.net/donkor_/article/details/77680042 前言: 众所周知,Android厂商非常多,各种尺寸的android手机.平板层出不穷 ...