【发布时间】:2016-08-08 18:32:24
【问题描述】:
我正在尝试构建我的 package.json 文件,但在编写脚本时遇到了困难。
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css":"node-sass --output-style compressed -o build/styles src/styles",
"pugtohtml": "npm pug -D index.pug"
},
这不起作用
我已经安装了 pug 包,现在我想只使用 npm 自动执行任务,你能帮我解决这个问题吗?如果你能给我一些关于如何学习编写脚本和使用自动化任务的提示和资源,我将不胜感激只需 npm,谢谢!
【问题讨论】:
-
会不会只是
pug -D index.pug而不是npm pug -D index.pug? -
你不必在 npm 中调用 npm,只需
pug [args]
标签: javascript node.js npm pug