草庐IT

grunt-ngdocs

全部标签

javascript - 你如何运行多个 grunt scripts.postinstall?

我正在尝试从grunt的scripts.postinstall运行多个CLI命令。我不知道如何让两者都运行。如果我添加第二个命令都不会运行。它们分别在安装后和控制台中工作。我已经尝试将它们包装在一个数组中:"scripts":{"postinstall":["node_modules/.bin/bowerinstall","gruntsetup"]},我尝试用分号分隔它们:"scripts":{"postinstall":"node_modules/.bin/bowerinstall;gruntsetup"},我似乎在NPMScripts上找不到解决方案这些部分的gruntfile.j

node.js - Meteor 需要 Gulp 还是 Grunt?

所以我一直在阅读Gulp和Grunt,以及他们如何缩小代码、压缩文件、将文件合二为一、livereload等。然而,Meteor用Isobuild已经完成了这一切.我问的原因是有人建议将Gulp与Meteor一起使用,但我认为没有必要。我应该与Meteor一起运行Gulp的一些可能原因是什么?或者它只是多余的?如果不是多余的,那么Gulp有哪些Isobuild中没有的功能?Meteor团队是否计划将Gulp整合到其下一个版本中? 最佳答案 需要可能不是正确的词。无论您是否愿意,都是另一回事。正如上面提到的评论,Meteor包含一个非

node.js - Grunt 无法启动 : ">> ReferenceError: grunt is not defined"

我是NodeJS和Grunt的新手,我正在努力完成这项工作。这是我得到的:$>gruntLoading"Gruntfile.js"tasks...ERROR>>ReferenceError:gruntisnotdefinedWarning:Task"default"notfound.Use--forcetocontinue.Abortedduetowarnings.这是我的Gruntfile:module.exports=function(grunt){grunt.initConfig({compass:{dist:{options:{config:'config/config.rb'

node.js - 如何使用 grunt.log 记录彩色消息

我想在运行特定任务时使用Grunt记录警告、黄色消息。目前我使用grunt.log.subhead输出粗体字,但没怎么注意。grunt.log.subhead'Youmaywanttouse--sourceMapsoption' 最佳答案 你可以试试这个:grunt.log.writeln('Youmaywanttouse--sourceMapsoption'['yellow'].bold);日志的gruntAPI文档没有提到如何做到这一点。我在这里的一组幻灯片中找到了它:http://slides.com/joshschumach

node.js - 运行 Grunt 任务时的优雅 fs 警告

我在运行一项繁重的任务时收到此警告:Warning:(node:2771)fs:re-evaluatingnativemodulesourcesisnotsupported.Ifyouareusingthegraceful-fsmodule,pleaseupdateittoamorerecentversion.有人知道如何摆脱它吗?以及如何找到它的来源?我的nodejs版本是6.0.0。 最佳答案 您现在最好的选择是降级到最新的Node5.x,直到更新该依赖项。建议您阅读:DON'TrushtoupgradetoNodev6和Bre

javascript - Grunt 编译 Jade 文件

我正在尝试配置我的Gruntfile以将我的所有Jade文件编译为单独的HTML文件。例如,如果我有以下源文件夹:source└──templates  ├──first.jade  ├──second.jade  └──third.jade然后我希望gruntjade输出:build└──templates  ├──first.html  ├──second.html  └──third.html这是我使用grunt-contrib-jade的Gruntfile:module.exports=function(grunt){grunt.initConfig({jade:{compil

node.js - Grunt-cli 和 Grunt - 同一个应用程序,两个版本?

Achtung!当时接受的答案回答了我的问题,但现在已经过时了。当时grunt-cli使用grunt,但使用了另一个分支。不被接受的答案会告诉你今天的情况。问题grunt-cli和grunt有什么关系和区别?好像是同一个东西,只不过版本不同。咕噜声https://npmjs.org/package/grunthttps://github.com/gruntjs/gruntGrunt-clihttps://npmjs.org/package/grunt-clihttps://github.com/gruntjs/grunt/blob/devel/docs/getting_started.

node.js - 如何从 Jenkins 运行 npm/grunt 命令

我是这个领域的新手,正在尝试从jenkins运行以下命令:npminstallgruntquickStart到目前为止,我已经在窗口机器上运行了一个jenkins作为窗口服务,并且我还为jenkins安装了NodeJs插件。但是,按照说明here,我被卡住并退出了困惑。,它要求我添加一个或模式nodeJs安装,我找不到这些设置,甚至不确定我是否首先需要它们。这是要求我做的事情:我看不到我创建的jenkins作业的此设置。有没有一种简单的方法可以从.bat或.sh脚本在jenkins中运行这些命令,因为我会推荐一个.batm在窗口机器上。注意:我已经在jenkins中检查了一个使用git

javascript - grunt 找不到模块 'coffee-script'

我使用以下命令安装平均堆栈并创建应用程序:>sudonpminstall-gmeanio@latest//Getthemeancmdline>meaninitmyApp//createyourfirstapp>cdmyApp&&npminstall//Installdependencies>grunt//Launchmean但是当我到达最后的grunt命令时,我得到了错误:module.js:333throwerr;^Error:Cannotfindmodule'coffee-script'atFunction.Module._resolveFilename(module.js:331

node.js - 如何让 Grunt Deploy 使用全局 NPM 模块而不是本地模块

首先,我对npm和grunt很陌生。我们有一个项目,我们正在使用Grunt为其编译和生成输出文件。我正在尝试设置我们的构建服务器以使用Grunt生成输出文件。我们正在使用带有TFS源代码控制的Windows,并且由于it's260characterpathlimit,我们无法将grunt-bower-task模块checkin源代码控制(asitaloneuses230charactersinitsinstalledpath)。当我从我的项目目录运行npminstall时,它工作正常并将以下所需模块安装到我的项目目录中的node_modules文件夹中:Grunt咕噜咕噜任务grunt