草庐IT

grunt-ngdocs

全部标签

node.js - 运行 grunt 时出现错误 : spawn ./node_modules/.bin/grunt ENOENT

我有一个由开始开发的项目yarn开始它运行一个启动grunt进程的index.js并得到这个错误:$yarnstartyarnstartv0.23.2$node./developmentgrunt_arguments['--force','--notify','--verbose','--debug','--stack']=======================================Openhttp://localhost:8000tostartdevelopingevents.js:141thrower;//Unhandled'error'event^Error:sp

windows - 在 Windows 上运行 grunt 时,我收到默认 grunt.js 文件的 "Access is Denied"错误

我正在Windows7机器上安装grunt.js。我在我的%PATH%上设置了Grunt,但是当我尝试执行它时,我收到这个错误:C:\project>gruntAccessisdenied.但是,如果我将grunt文件从grunt.js重命名为gruntfile.js并使用--config标志重新运行Grunt,它有效:C:\project>grunt--configgruntfile.js...LotsofGruntoutput...5specs,0failuresin0.041s.Done,withouterrors.我的%PATH%设置如下:设置PATH=.;%NODE_HOME

windows - grunt "Error: Cannot find module ' ../time/convert'(仅在 Windows 上)

在linux下建立一个新的angular项目。将其提交到git并将其克隆到windows。使用bower和npm,我设法加载了所有内容,除了我有一个错误(仅在Windows上)项目中../time/convert的递归grep显示:./node_modules/grunt-contrib-imagemin/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js:varconvert=require('../time/convert');./node_modules/grunt-contr

node.js - 如何在 node.js 中手动安装 grunt.js?

是否可以在node.js中手动安装grunt.js。实际上我的支持团队下载了适用于Windows机器的grunt.js并放在我的机器上。由于我公司的代理无法通过Nodenpminstall-ggrunt-cli安装。所以要安装与下载包相同的形式。或者我们可以在没有node.js的情况下安装grunt.js? 最佳答案 尽管手动安装模块很容易,只需将它放在node_modules/grunt或直接引用它require('./path/to/grunt/directory'),真正的问题是你还需要下载grunt'sdependencie

windows - Grunt/Batch : how to execute shell commands within the gruntfile. js目录?

我知道这是一个常见问题,但我尝试过的所有答案均无效。奇怪的是,一位friend在他的Windows上尝试了这个脚本,实际上得到了当前目录(包含gruntfile.js的目录)。我试图查看差异,但也没有发现任何差异。module.exports=function(grunt){grunt.initConfig({pkg:grunt.file.readJSON('package.json'),shell:{test:{command:'dir'}}});grunt.loadNpmTasks('grunt-shell');};这是我得到的:D:\Websites\AUB>gruntshell

windows - 如何在 Windows 上启动 node --debug grunt 服务器?

运行Windows8.1并且我的环境运行良好,除了我无法在--debug中启动Node,以便Node检查器可以连接到某些东西。我有一个带有grunt-concurrent的Gruntfile设置,它可以让我打开grunt-devtools、node-inspector,然后就可以正常观看了,但我想不出一个可行的语法来让它在调试中与Node一起运行。以下是我期望的工作,但也是我尝试时遇到的错误。请注意,有一条消息表明调试服务器正在监听,但有些东西从那里崩溃并失败了,所以这对我没有好处。C:\PROJECTS\bManWebService_Hapi>node--debugC:\Users\

windows - Grunt.js 在使用 watch 任务时生成一个新的 Node 进程

当使用grunt的监视任务时,Grunt.js显然会生成一个新的node.js进程:http://www.youtube.com/watch?v=fgRlcFt9dkg一旦我保存我的文档,默认任务就会执行,并且(如您在视频中所见)突然有一个新的node.exe进程。这是我的grunt文件:module.exports=function(grunt){grunt.loadNpmTasks('grunt-contrib-clean');grunt.loadNpmTasks('grunt-contrib-compress');grunt.loadNpmTasks('grunt-contrib

php - 在 Windows 上从 PHP 运行 Grunt 命令

要在我的Mac上从PHP运行grunt命令,我可以使用putenv告诉PHPNodeJS所在的位置和全局路径,这样我就可以运行grunt命令,例如:putenv('PATH='.getenv('PATH').':/usr/local/bin');exec('gruntwatch');但是在Windows7上,NodeJS位于不同的位置...我第一次尝试:putenv('PATH='.getenv('PATH').':C:\ProgramFiles(x86)\nodejs');这是NodeJS本身所在的位置,但这不起作用...然后尝试:putenv('PATH='.getenv('PAT

javascript - Grunt - 解析非字符串(例如数组)模板

假设我的grunt配置中有一个变量,它的值是一个数组。一个真实世界的例子是来自grunt-regarde的grunt.regarde.changed插件,列出所有已更改的文件。我想使用模板解析该数组,以便我可以(在本例中)复制更改的文件:copy:{staticWeb:{src:'',dest:'someDir'},在这种情况下,src得到的是一个逗号分隔的字符串,而不是一个数组。Grunt的文件处理器不解析字符串,因此找不到src文件。我无法删除模板周围的单引号,因为那样它就是无效的javascript。那么如何将grunt.regarde.changed数组传递给src变量呢?

javascript - Grunt wiredep 没有注入(inject) font-awesome

我目前正在从事一个已经开始使用yeoman的项目。出于某种原因,当我运行grunt-wiredep时,除了font-awesome之外,所有依赖项都被正确地注入(inject)到我的index.html中。这是我的bower.json文件:{"name":"watermelon","version":"0.0.0","dependencies":{"angular":"^1.3.0","angular-animate":"^1.3.0","angular-bootstrap":"~0.13.3","angular-cookies":"^1.3.0","angular-google-ma