gpt4 book ai didi

javascript - 如何在 npm 脚本中将 pug(jade) 渲染为 html?

转载 作者:太空宇宙 更新时间:2023-11-04 00:36:15 24 4
gpt4 key购买 nike

我正在尝试构建我的 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,谢谢!

最佳答案

你必须这样写任务

"pugtohtml": "pug --output-style compressed -o dist/html/ assets/pug/*.pug"

关于javascript - 如何在 npm 脚本中将 pug(jade) 渲染为 html?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38836164/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com