npm scripts构建
管道(|)运算符会将一个命令的输出以流的方式作为另一个命令的输入。
重定向(>)运算符则会将输出重定向到文件。
< 将文件内容输入到一个命令
在Unix中,还可以通过“&”运算符同时运行两个命令。npm run script1.js & npm run script2.js
npm-run-all A CLI tool to run multiple npm-scripts in parallel or sequential.
run-s is for sequential, run-p is for parallel. We can make simple plans with those commands.
cross-env Run commands that set environment variables across platforms(https://www.npmjs.com/package/cross-env)
ShellJS是个通过Node来运行Unix命令的npm包。这样就可以通过它在所有平台上运行Unix命令了,也包括Windows。(https://www.npmjs.com/package/shelljs)
npm安装相关
全局安装报权限错时,执行以下命令
sudo chown -R xiaoxue /usr/local/lib/node_modules
sudo chown -R xiaoxue /usr/local/bin
sudo chown -R xiaoxue /usr/local/share
参考文章http://www.infoq.com/cn/news/2016/02/gulp-grunt-npm-scripts-part2
相关知识 http://www.tutorialspoint.com/unix/unix-useful-commands.htm
https://www.pluralsight.com/courses/npm-build-tool-introduction