Tag: gruntjs

ng重新安装应用程序后,无法写入EPERM(无法写入)

我使用ngBoilerplate作为我的应用程序的基础。 ngbp正在使用ngAnnotate和grunt-ng-annotate来标记应用程序。 一切工作正常,直到我不得不格式化我的电脑,并从我的git帐户重新安装应用程序。 我已经使用npm install,bower install&grunt install再次安装了所有东西,并且所有东西似乎都被正确安装,所有的依赖关系都存在,所有的路由都是正确的。 当我运行“grunt watch”时,构build过程正常工作。 当我运行“grunt build”时,构build过程在ngAnnotate上失败,它每次停止在不同的文件上,所以问题与错误信息中显示的文件无关 运行“ngAnnotate:compile”(ngAnnotate)任务 警告:无法写入“build / src / app / somefile.js”文件(错误代码:EPERM)。 使用–force继续。 由于警告而中止。 这是ngAnnotateconfiguration(编辑器删除一些图表,请参阅https://gist.github.com/orzilca/f8a7312587a710094342 ): ngAnnotate:{ 编译:{ 文件:[ { src:['app_files.js(修剪,见上面的链接)'], cwd:'build_dir', dest:'build_dir', 展开:true } ] } }, 这是app_files.js数组: app_files:{ js:['src / ** / *。js','!src / ** / *。spec.js','!src / assets / ** / *。js'] } 完整的grunt文件在这里: https […]

grunt-contrib-sass在Windows中不起作用

我正在尝试使用Grunt将scss文件编译为css,但由于未知原因,我失败了。 这是我的Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ bower: { install: { options: { targetDir: 'dependencies', cleanup: true, layout: 'byComponent' } } }, sass: { foundation: { files: { 'a.css': 'a.scss' } } } }); grunt.loadNpmTasks('grunt-bower-task'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.registerTask('dependencies', ['bower:install']); grunt.registerTask('assets', ['sass:foundation']); }; 我收到以下错误: > grunt assets Running "sass:foundation" (sass) task Warning: spawn C:\Windows\system32\cmd.exe;C\MySQL\bin ENOENT Use –force […]

未find本地Npm模块“grunt-template-jasmine-istanbul”

这里是我的gruntconfiguration文件 – https://github.com/mdarif/JavaScript-Boilerplate/blob/1.3/GruntFile.js 它不会加载模块 – grunt-template-jasmine-istanbul并且Local Npm module "grunt-template-jasmine-istanbul" not found. Is it installed? Local Npm module "grunt-template-jasmine-istanbul" not found. Is it installed? 加载类似require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);的grunt任务require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); 希望有人能帮忙快点!

加载“connect_proxy.js”任务…错误>>types错误:无法读取未定义的属性“原型”

我正在尝试使用grunt运行一个http服务器。 但是,当我在相应的目录中inputgrunt serve时,出现以下错误: Loading "connect_proxy.js" tasks…ERROR >> TypeError: Cannot read property 'prototype' of undefined Loading "connect_proxy.js" tasks…ERROR >> TypeError: Cannot read property 'prototype' of undefined

将Sails.js项目部署到Google云:“致命错误:无法find本地咕噜声”。

我正在尝试将一个sails.js项目部署到Google云端。 运行gcloud preview app deploy app.yaml –set-default ,部署似乎成功,但当我浏览到我的项目,我看到的只是 错误:服务器错误 您请求的服务尚不可用。 请在30秒后重试。 来自console.developers.google.com的日志显示“ 致命错误:无法find本地咕噜声”。我应该在Google云上configuration一些可用的咕噜声吗? 或者我应该在我的项目中configuration什么来让云find咕噜声? 我已经能够从https://cloud.google.com/nodejs/成功部署演示项目,但不能使用Sails.js项目。 更新:解决 这个问题是通过在本地安装grunt和grunt-cli以及一堆其他依赖项来sorting的。 任何有同样问题的人都可以这样做: 确保package.json文件包含以下依赖项: "dependencies": { "express": "^4.12.0", "gcloud": "^0.15.0", "grunt": "^0.4.5", "grunt-cli": "^0.1.13", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-coffee": "^0.13.0", "grunt-contrib-concat": "^0.5.1", "grunt-contrib-copy": "^0.8.0", "grunt-contrib-cssmin": "^0.12.3", "grunt-contrib-jst": "^0.6.0", "grunt-contrib-less": "^1.0.1", "grunt-contrib-uglify": "^0.9.1", "grunt-contrib-watch": "^0.6.1", "grunt-gcloud": "^0.2.0", "grunt-sails-linker": "^0.10.1", "grunt-sync": "^0.2.3", "sails": "^0.11.0", […]

从grunt中更新NPM模块

我试图自动更新新的节点模块,但是,npm更新似乎不想从grunt中正确运行也更新package.json文件与新版本。 我想这样做,不pipe在package.json文件中指定了什么版本。 直到现在我发现的是节点模块:npm-check-updates( https://www.npmjs.com/package/npm-check-updates ) 问题是,我不能让它与其他模块,如npm-shell或npm-exec。 我试过直接使用npm update -D,但是也失败了。 我问是否可以做。 以下是我使用的: grunt.registerTask('update', 'Update npm modules', function() { var exec = require('child_process').exec; var cb = this.async(); exec('npm update -D', {}, function(err, stdout) { console.log(stdout); cb(); }); });

如何在Nodejs中执行依赖关系的recursion安装?

我有以下结构的项目。 parentDir —> Child1 —- [Child1] package.json —> Childe2 —- [Child2] package.json —–> SubChild3 —— [subchild3] package.json —- [parent] package.json 我有独立的模块,它有自己的依赖关系,我想要一次安装所有的软件包,我不想进入特定的目录。 这可能吗 ? 我尝试了使用shell脚本来保存目录path,但代码库发生了巨大的变化,因此无法总是更新shell脚本目录条目。 如何在Nodejs中使用像Grunt等任何跑步者来实现这一点?

使用grunt进行自定义项目

我正在使用Grunt作为“JS Task Runner”。 节点安装在“C:/ Program Files”中。 NPM安装在C:/ users / Peterson / appdata / roaming / npm中。 grunt,bower和grunt-cli在npm文件夹里。 创build一个项目 – D:/项目A. D:/ ProjectA – “package.json”和gruntfile.js文件 的package.json { "name": "Test-Project", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.1", "grunt-contrib-concat": "~0.1.3" } } gruntfile.js module.exports = function(grunt) { // Project configuration. grunt.initConfig({ //Read the package.json (optional) pkg: grunt.file.readJSON('package.json'), // Metadata. […]

使用sails时,是否需要在package.json中显式地使用grunt?

我有sails app和主package.json如下。 我真的需要这里所有的咕噜声,如果帆也有。 特别是如果帆在0.4.5版本中咕噜咕噜,在这里我有0.4.2反正没有主要应用程序package.json咕噜入口。 sails lift后有错误。 这看起来有些不一致。 { … "dependencies": { "ejs": "~0.8.4", "grunt": "0.4.2", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-coffee": "~0.10.1", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-copy": "~0.5.0", "grunt-contrib-cssmin": "~0.9.0", "grunt-contrib-jst": "~0.6.0", "grunt-contrib-less": "0.11.1", "grunt-contrib-sass": "^0.9.2", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-watch": "~0.5.3", "grunt-sails-linker": "~0.9.5", "grunt-sync": "~0.0.4", "include-all": "~0.1.3", "mongodb": "^2.0.41", "rc": "~0.5.0", "sails": "git://github.com/balderdashy/sails.git", "sails-disk": "~0.10.0", "sails-mongo": "^0.11.2" } … }

如何使grunt watch和grunt nodemon一起工作

我在node.js中有一个web应用程序,我想从nodemon开始,所以每次主脚本更改时,webapp都可以重新启动。 同时,我有我的咖啡脚本文件,我需要重新编译每次他们任何一个变化。 我已经设置了一个grunt-contrib-watch任务来侦听app/frontend/*.coffee文件,以分派咖啡分析器。 但是,这似乎并没有发生,因为nodemon任务也在监听。 我在nodemon ignore中设置了app/frontend/文件夹。 我也设置了nodemon并观察并发。 不过,每次我编辑咖啡脚本,咖啡任务都不会执行。 这是我的Gruntfile module.exports = function(grunt) { // Project configuration. grunt.initConfig({ concurrent: { dev: [ 'nodemon', 'watch' ], options: { logConcurrentOutput: true } }, coffee: { compile: { files: { 'app/public/app.js': ['app/frontend/*.coffee'] } } }, nodemon: { dev: { script: 'app/index.js', options: { ignore: ['app/frontend/**', 'app/public/**'] } } }, […]