gruntjs

Running `grunt` on VM Shared Directory

空扰寡人 提交于 2019-12-05 22:41:13
问题 Using Vagrant with a Windows host and Linux guest, grunt returned the following error when trying to run a job. As I understand, this file path exceeds the 255 character limit of Windows when on a host-guest shared directory. npm ERR! Error: EPERM, open '/u01/aa/bb/build/share/app-core/app- ui/node_modules/grunt-contrib-imagemin/node_modules/pngquant-bin/node_modules/bin- wrapper/node_modules/download/node_modules/request/node_modules/form- data/node_modules/combined-stream/test/integration

Angular / grunt failed to load template

£可爱£侵袭症+ 提交于 2019-12-05 22:32:22
I recently introduced angular directives into my yeoman app for templating, and everything works fine if I grunt serve the normal dev version of the app, but when I build the 'dist' folder with grunt and serve it, the html in the directives of my app don't appear on the page and the console logs this error: Failed to load resource: the server responded with a status of 404 (Not Found) vendor.6e8f248d.js:5 Error: [$compile:tpload] Failed to load template: /views/tabdir.html (HTTP status: 404 Not Found) I read that dependency injection needs to be in an array format so that minification doesn't

Git: Storing but not pulling LESS files

余生颓废 提交于 2019-12-05 21:59:20
I recently started working with LESS, and as I did some research to automated builders like Jenkins and Grunt, it seemed a common piece of advice was not to store LESS files on the repo, or not to have them on the live server, just the compiled CSS. So I was hoping to get some advice on this. It seems that as LESS files are part of the project, storing them is necessary. But it makes sense not to have extra, random files on the live server. Deleting them myself seems the wrong way to do it every build, plus time consuming. I assume I can get automated builders to do it for me, though I don't

Why does Yeoman build without /styles/fonts?

被刻印的时光 ゝ 提交于 2019-12-05 21:44:29
问题 After running grunt build I'm left with no fonts directory inside dist/styles . What am I doing wrong? Here's what I have in the Gruntfile.js : compass: { options: { sassDir: '<%= yeoman.app %>/styles', cssDir: '.tmp/styles', imagesDir: '<%= yeoman.app %>/../images', javascriptsDir: '<%= yeoman.app %>/scripts', fontsDir: '<%= yeoman.app %>/../styles/fonts', importPath: 'app/bower_components', relativeAssets: true, }, dist: { options: { imagesDir: '<%= yeoman.dist %>/images', fontsDir: '<%=

Grunt.js: Fire livereload as soon a files are modified, before task completes

拟墨画扇 提交于 2019-12-05 20:55:24
I'm using Grunt to compile my CSS with compass and trigger the browser livereload. These are my watch tasks: watch: { styles: { options: { spawn: false, }, files: [assetsDir + '/**/*.scss', '!**/*.{dev,min}.scss'], tasks: [ 'concat:styles', 'compass:styles', 'imagemin:styles', 'cssmin:styles', 'clean:styles', ], }, scripts: { options: { spawn: false, }, files: [assetsDir + '/**/*.js', '!**/*.{dev,min}.js'], tasks: [ 'concat:scripts', 'uglify:scripts', ], }, livereload: { options: { livereload: true, spawn: false, }, files: [assetsDir + '/**/*.{dev,min}.{css,js}'], }, }, At the moment the

Module not found error in AngularJS unit test

穿精又带淫゛_ 提交于 2019-12-05 20:45:01
I'm trying a very simple test with Karma/Jasmine, to unit test my AngularJS app. This seems to work beforeEach( module('myApp') ); it('should blah', function () { expect(true).toBe(true); }); while this doesnt beforeEach( function () { module('myApp') } ); it('should blah', function () { expect(true).toBe(true); }); I want to be able to do other stuff beforeEach test suite, but it's not giving me any meaningful errors to be able to debug it, the only one I see is TypeError: 'undefined' is not an object (evaluating 'currentSpec.queue.running') relating to the line where the function is called

Use the Bootstrap config.json file with Bower

試著忘記壹切 提交于 2019-12-05 19:07:21
问题 I used the Bootstrap customizer tool: http://getbootstrap.com/customize/ It generates a config.json file that I reuse whenever I need to make changes. I use Bower to handle all my dependencies, except Bootstrap, because I need my customized version. Is there a way I can tell Bower to use my config.json file to generate the CSS? The chosen answer to this question seems to state that it is actually possible, but it doesn't give much details and I couldn't find anything else about that anywhere:

How does Ember.js reference Grunt.js precompiled Handlebars templates?

∥☆過路亽.° 提交于 2019-12-05 18:22:23
问题 I've been exploring Ember.js, along with Grunt.js but I can't understand how Ember.js is able to find and use precompiled Handlebars templates. Right now my Gruntfile.js looks like this: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), handlebars: { compile: { files: { "js/templates.js": "templates/*.hbs", } } } }); // Load the plugin that handles the handlebars compiling grunt.loadNpmTasks('grunt-contrib-handlebars'); /

Wrong CSS Path - Live Reload issue with Grunt

ぃ、小莉子 提交于 2019-12-05 18:20:52
问题 I have this setup in my Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ less: { development: { options: { compress: false, yuicompress: false, optimization: 0 }, files: { // target.css file: source.less file "assets/css/main.css": "assets/css/main.less" }, } }, watch: { styles: { // Which files to watch (all .less files recursively in the less directory) files: ['assets/css/*.less', 'assets/less/*.less'], tasks: ['less'], }, // Live reload CSS css: { files: ['assets/css/*

Grunt uglifym - call stack size exceeded

青春壹個敷衍的年華 提交于 2019-12-05 18:05:39
I am trying to use uglify with grunt to concat and minify some files. I have already used the npm to install grunt-contrib-uglify . I have the following in my grunt.js file: (I have removed some other tasks for anonymity) module.exports = function(grunt) { 'use strict'; grunt.loadNpmTasks('grunt-contrib-uglify'); uglify: { options: { sourceMap: 'app/map/source-map.js' }, files: { 'app/dist/sourcefiles.min.js': [ 'app/test_js/test.js' ] } } }; I then run: grunt uglify but I keep getting the following error: Warning: Maximum call stack size exceeded Use --force to continue. If I use force, the