Tag: gruntjs

咕噜uglify任务失败

运行grunt时,出现以下错误: 警告:无法写入“client / dist / js / build.js”文件(错误代码:undefined)。 使用–force继续。 Gruntfile.js的configuration在我的Gruntfile.js : uglify: { build: { src: ['client/src/js/*.js'], dest:['client/dist/js/build.js'] } } 我正在使用grunt-contrib-uglify 。 任何想法为什么发生这种情况?

grunt-contrib-jshint警告:path必须是string;

我一直在试图使用jshint grunt模块来validation我的代码,但我总是得到以下错误: Running "jshint" task [D] Task source: C:\Coursera\03. Intro Angular JS\conFusion\node_modules\grunt-contrib-jshint\tasks\jshint.js Running "jshint:all" (jshint) task [D] Task source: C:\Coursera\03. Intro Angular JS\conFusion\node_modules\grunt-contrib-jshint\tasks\jshint.js Verifying property jshint.all exists in config…OK Files: Gruntfile.js, app/scripts/app.js Options: force=false, reporterOutput=null, jshintrc=".jshintrc", reporter={} Warning: Path must be a string. Received { toString: [Function], reporter: [Function] } Use –force to continue. 问题是即使使用–verbose和-debug,它不显示任何工作的错误,只是“path必须是一个string”,我用JSLint(使用括号)validation文件,它工作得很好,网站也工作正常。 […]

Node / NPM / Grunt在jscs上失败(grunt-jscs)

我有一个在JS代码基础上运行JSCS的grunt任务,它一直在工作,直到与使用最新,稳定版本的grunt,npm / node的构build服务器集成为止。 在npm 1.XX.X下全部运行正常,但在升级到2.XX.X后, 我尝试了最新的3.XX.X,并且以与2.XX.X相同的方式失败。 我认为所需的相关部分是 cli输出: $ node -v v5.2.0 $ npm -v 3.3.12 $ grunt –version grunt-cli v0.1.13 grunt v0.4.5 $ grunt jscs Loading "jscs.js" tasks…ERROR >> TypeError: fn.call is not a function Warning: Task "jscs" not found. Use –force to continue. Aborted due to warnings. 的package.json: { "name": "Javascript", "version": "1.0.0", […]

生成伊斯坦布尔代码覆盖率报告为茉莉花testing运行(通过咕噜)phantomjs的一个browserify包

标题说明了一切。 尽pipe通过networking浏览,我还没有find一个解决这个问题的例子。 这里有一些错过 https://github.com/amitayd/grunt-browserify-jasmine-node-example – grunt,browserify和jasmine https://github.com/gotwarlost/istanbul/issues/59#issuecomment-18799734 – browserify和伊斯坦布尔 这里是我正在进行的代码https://github.com/wheresrhys/on-guard/tree/browserify (注意这是“browserify”分支 – Gruntfile.js是一个混乱,但将很快整理)。 我最初的调查使用console.log表明,不知何故bundle.src.js被加载到页面中,但是当testing运行(并通过!) bundle.src.js的代码没有运行,所以我有一个感觉这可能是一个混淆的问题…虽然一个仅限于phantomjs,因为当我打开铬的specrunner代码正在运行。

Node.js和TeamCity

我有以下问题: 在我们公司,我们开始一个新的Web项目,有很多.js .css文件。 我们公司是一家Java公司,意味着所有的开发工作都在Java / Maven / Team City中完成。 由于公司已经在使用TeamCity,所以我们也想将它用于Web构build,我们正在尝试在构build过程中引入Node.js和GruntJs。 我想知道是否有人在TeamCity中设置/configurationNode.js像Runner一样? 最后,我们要“提交”一个更改,然后构build,这个构build将通过Node.js runner来完成。 我find了TeamCity的下面的插件 。 任何帮助将不胜感激

如何解决在npm安装peerinvalid错误?

我试图按照步骤来贡献PhysicsJS( https://github.com/wellcaffeinated/PhysicsJS#contributing ),并在npm install出现以下错误。 npm ERR! peerinvalid The package grunt-contrib-jasmine does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer grunt-template-jasmine-requirejs@0.1.10 wants grunt-contrib-jasmine@~0.5.3 npm ERR! System Linux 3.13.0-24-generic npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /home/slacktracer/Dropbox/dev/PhysicsJS npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.3 npm ERR! code EPEERINVALID npm ERR! […]

让Jasmine在服务器端运行

我正在尝试开始使用Node.JS在服务器端testingJavaScript 我正在使用grunt和grunt-jasmine-node ,但我无法运行我的testing。 它只是logging PS C:\ Development \ NET \ Source \ jsn> grunt运行“jasmine_node”任务未定义 在0.001秒内完成0个testing,0个断言,0个失败 完成,没有错误。 这是我的Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jasmine_node: { specNameMatcher: 'spec', projectRoot: '.', requirejs: false, forceExit: true, jUnit: { report: false, savePath : "./build/reports/jasmine/", useDotNotation: true, consolidate: true } } }); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.registerTask('default', 'jasmine_node'); }; 而我的文件结构是这样的: 那么,我做错了什么? 这就像stub.js文件甚至没有加载,因为它有一个console.log调用来testing。

Grunt Uglify – 如何创build用于debugging的源地图?

我在项目中使用grunt,并创build任务来缩小和连接许多.js文件。 我现在试图弄清楚如何使用Uglify创build一个源图,以便其他团队可以轻松分析控制台中的代码。 我的Gruntfile(咖啡)的一部分看起来像这样两个: uglify: options: mangle: false / grunt.registerTask 'devmin', ['clean', 'concurrent:transform', 'useminPrepare', 'concat', 'uglify', 'usemin', 'copy:build', 'server', 'watch:dist'] # Dev – minifies files 所以,当我在terminal上运行“grunt devmin”时,我会缩小版本,但是我不知道如何为了debugging目的而创build相关的源代码。 任何人都有一个提示? 谢谢!

警告:运行grunttesting时没有find任务“业力”

Kickstart Your AngularJS Development with Yeoman, Grunt and Bower 在遵循这个关于Angular,Yeoman,Bower和Grunt的有趣的指南之后,我能够引导一个Angular应用程序。 一切工作正常,除了与噶的testing。 当我运行: grunt test 我得到以下错误: Warning: Task "karma" not found. Used –force, continuing. Done, but with warnings 我检查了是否已经安装了Karma,但是已经安装了。 对于Grunt来说,你似乎需要安装grunt-karma。 所以我试着通过下面的命令: npm install grunt-karma –save-dev 这给了我错误,如: errno: 53, code: 'ENOTEMPTY', path: 'C:\\tmp\\phantomjs\\phantom-1.9.2-windows-.zip-extract-' .. 我在Windows上,并执行从PowerShell的命令。 希望有人能帮忙。 编辑karma.conf.js和gruntfile // Karma configuration // http://karma-runner.github.io/0.10/config/configuration-file.html module.exports = function(config) { config.set({ […]

用于创buildEMR集群的Lambda不会激发集群创build

我试图运行一个创build一个集群的λ代码,但没有任何反应,也许我误解了Node上的用法(因为我不太熟悉它)。 function如下简单: //configurationAWS Dependecies var AWS = require('aws-sdk'); exports.handler = function(event, context) { // EMR Client var emr = new AWS.EMR({apiVersion:'2009-03-31', region:'us-east-1'}); var params = {… dozens of params describing jobs …}; var AWSRequest = emr.runJobFlow(params); AWSRequest .on('success', function(response){ console.log("success => " + response)}) .on('error', function(response){ console.log("error => " + response)}) .on('complete', function(response){ console.log("complete => […]