File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,28 @@ npm config set registry https://registry.npmjs.org/
45
45
npm uninstall -g node-sass
46
46
```
47
47
48
+ ## 增加npm-run-all
49
+ 我们可以安装 ` npm-run-all ` 包,来支持运行多个命令: 并行 ` run-p ` , 串行 ` run-s `
50
+
51
+ ::: code-group
52
+ ``` json [改造前]
53
+ {
54
+ "scripts" : {
55
+ "build" : " npm run build:esm && npm run build:cjs" ,
56
+ "build:esm" : " echo build esm" ,
57
+ "build:cjs" : " echo build cjs"
58
+ }
59
+ }
60
+ ```
61
+ ``` json [改造后]
62
+ {
63
+ "scripts" : {
64
+ "build" : " run-p build:esm build:cjs"
65
+ }
66
+ }
67
+ ```
68
+ :::
69
+
48
70
## 快速下载node-sass等
49
71
类似 ` node-sass ` , ` phantomjs ` 等会从 ` github.com ` 上下载一个 ` .node ` 文件,大部分安装不成功的原因都源自这里,因为 ` GitHub Releases ` 里的文件都托管在 ` s3.amazonaws.com ` 上面,而这个地址被墙了
50
72
``` shell
@@ -66,3 +88,4 @@ sqlite3_binary_site=https://npm.taobao.org/mirrors/sqlite3/
66
88
67
89
## 参考
68
90
1 . [ 安装 node-sass 的正确姿势] ( https://github.com/lmk123/blog/issues/28 )
91
+ 1 . [ npm-run-all2] ( https://www.npmjs.com/package/npm-run-all2?activeTab=readme )
You can’t perform that action at this time.
0 commit comments