gruntjs

grunt-contrib-build' is not in the npm registry

这一生的挚爱 提交于 2019-12-05 17:48:56
I'm getting below error when I try to install npm install grunt-contrib-build --save-dev on my Windows 7 system using command prompt. C:\css-base>npm install grunt-contrib-build --save-dev npm WARN package.json my-project@0.1.0 No README.md file found! npm http GET https://registry.npmjs.org/grunt-contrib-build npm http 404 https://registry.npmjs.org/grunt-contrib-build npm ERR! 404 'grunt-contrib-build' is not in the npm registry. npm ERR! 404 You should bug the author to publish it npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, or http url, or

AWS Elastic Beanstalk run Grunt task

拥有回忆 提交于 2019-12-05 16:46:19
I want to run a node.js application on elastic beanstalk. I have a client which gets build by a grunt job (jade, less, concat, etc.) I excluded this folder from git I can localy run this by grunt buildClient which is executed by grunt-cli I added grunt and grunt-cli in my packages dev-dependencies I want to run the grunt build before the application is launched, i already setup a configuration in .ebextensions/app.config container_commands: 01_build_client: command: grunt buildClient I guess my cwd is /tmp/deployment/application/ but there is says Fatal error: Unable to find local grunt . I

Using r.js to package a SPA application that loads views using 'text'

余生颓废 提交于 2019-12-05 16:05:07
问题 I'm attempting to build a SPA application (requirejs, durandal 2, knockout) into a single main-build.js file using grunt, and I'm running into serious issues with the 'text' plugin that durandal is using to load my views. In dev, I'm successfully using 'text' to load views dynamically as per the standard way of building durandal apps. The difference is that I need to do some server side templating for the views and so they are actually being dynamically generated. With that in mind I'd like

What is “{.tmp,app} ” in Yeoman generator?

岁酱吖の 提交于 2019-12-05 14:05:06
问题 I am getting started with the Yeoman workflow, but I can't seem to completely understand the "alternate search path" for the usemin task in the index.html file. For example, there are 2 blocks generated with the 'yo angular' command: <!-- build:js scripts/modules.js --> <script src="bower_components/angular-resource/angular-resource.js"></script> <script src="bower_components/angular-cookies/angular-cookies.js"></script> <script src="bower_components/angular-sanitize/angular-sanitize.js"><

Grunt Uglify source map “unable to write”

﹥>﹥吖頭↗ 提交于 2019-12-05 13:34:40
I'm using Grunt to concat and minify files (with grunt-contrib-uglify and grunt-contrib-concat ) and I wanted to add a source map. The uglify docs say to just add an option for sourceMap set to a boolean of true. But when I add that to my tasks (I've tried a couple different ones) the process runs fine until it gets to the source map part, then I get: Writing true...ERROR Warning: Unable to write "true" file (Error code: undefined). Use --force to continue. The concatenation is done, the minification is done. But... no luck with the sourcemap. Sample from my Grunt file: uglify: { options: {

Grunt Concat Task, how to ignore all .min.js files?

微笑、不失礼 提交于 2019-12-05 12:05:42
问题 I have the following grunt concat task. How can I make concat ignore all minified files? This doesn't work. concat: { js: { src: [ '<%= globalConfig.bar %>', '<%= globalConfig.foo %>/*.js', '<%= globalConfig.foo %>/!*.min.js', '<%= globalConfig.fooLib %>/*.js', '<%= globalConfig.fooLib %>/!*.min.js' ], dest: '../../foo/fooCombined.js' }, css: { src: ['<%= globalConfig.foo %>/*.css'], dest: '../../foo/fooCombined.css' } }, This also doesn't work: '<%= globalConfig.fooLib %>/(*.js && !*min.js)'

Error: Cannot find module 'time-grunt'

女生的网名这么多〃 提交于 2019-12-05 11:57:52
问题 I try install time-grunt local and global, clear npm cache, update npm, but nothing helps. I get: Loading "Gruntfile.js" tasks...ERROR Error: Cannot find module 'time-grunt' Warning: Task "default" not found. Use --force to continue. My version od packages: node: '0.10.31', npm: '1.4.23' After run: npm install --save-dev time-grunt in package.json state: "devDependencies": { "grunt": "^0.4.5", ... "time-grunt": "^1.0.0" } This is part of my grunfile.js: module.exports = function( grunt ) {

Grunt task Compass fails - Could not find RubyGem compass (>= 0)

ε祈祈猫儿з 提交于 2019-12-05 10:41:45
I recently transfered machines from an iMac to a new Mac Book Pro with Mavericks. All was well but I noticed that Grunt was crashing when I saved a file (the auto update wasn't working). I tried to update my system but when I run my grunt tasks via the terminal I get the following error: Running "compass:dev" (compass) task /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem compass (>= 0) (Gem::LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in

Disable minification in Grunt (Yeoman)

梦想的初衷 提交于 2019-12-05 10:36:38
I recently started using GruntJS through Yeoman and I like the idea of Javascript minification, but it presents difficulties during development. I tried to disable uglify,usemin, etc in different combinations in the Gruntfile but everything seems to be dependent on another thing and breaks the process. Is there a simple way to disable minification? I am using the latest versionof Grunt offered by Yeoman to date, I found that older solutions have a different Gruntfile setup than that usd with Yeoman. Here is my Gruntfile: // Reads HTML for usemin blocks to enable smart builds that automatically

How to add --harmony node flag to grunt-express

大城市里の小女人 提交于 2019-12-05 10:15:26
I'm using grunt-express to do local development. here is my GruntFile.js var path = require('path'); module.exports = function(grunt){ grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify:{ options:{ banner:'/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' } }, express:{ server:{ options:{ debug:true, server: path.resolve('app.js') } } }, env : { options:{ }, dev : { NODE_ENV : 'development' }, prod : { NODE_ENV : 'production' } }, mochaTest:{ test:{ options:{ reporter:'spec' }, src:['tests/*.js'] } } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt