Tag: build tools

在Windows中不能使用GLOB和JSHint?

我正在做NPM的PoC作为构build工具( http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ )。 我是相当新的使用NPM。 现在,我只安装了JSHint和Mocha。 我的packagae.json被附上。 现在,当我在命令行(Windows 7)中运行“npm run lint”时,它给我一个错误: c:\project>npm run list MyNPMProject@1.0.0 lint c:\project jshint test/*.js 错误:无法打开testing/ *。js 当我更改脚本“lint”:“jshint test / test.js”时,它可以工作。 我可以用jshint使用glob吗? 请提前告知并感谢您。

在npm run-script中使用node-sass监视选项

所以我在npm包脚本中运行任务,但是我想在npm start传递watch选项。 这工作: "scripts": { "scss": "node-sass src/style.scss dist/style.css -w" } 这不会编译,观察或抛出任何错误: "scripts": { "scss": "node-sass src/style.scss dist/style.css", "start": "parallelshell \"npm run scss — -w\"" } 如果没有并行工具,或者没有简写工作,就无法工作。 我认为问题是运行脚本传递引号中的额外的参数,所以命令出现如下: node-sass src/style.scss dist/style.css "-w" 我希望这个工作没有添加任何依赖。 我错过了什么? 顺便说一句,我在Windows 10与命令提示符/ git bash。