Configure grunt copy task to exclude files/folders

Found the solution: There is no need for these lines: files: [ {src: [‘.conf1’, ‘.conf2’, ‘./config.js’], dest: ‘output/toolkit/’, filter: ‘isFile’}, {src: [‘./css/**/*’, ‘./img/**/*’, ‘./js/**/*’, ‘./release/**/*’, ‘./lib/**/*’, ‘./locale/**/*’], dest: ‘output/toolkit/’}, {expand: true, cwd: ‘./’, src: [‘**’], dest: ‘output/’} ] because {expand: true, cwd: ‘./’, src: [‘**’], dest: ‘output/’} is a new copy step, copying all files … Read more

Fontawesome is not working when project is built with grunt

I had the same problem. The following code solved my problem. copy: { dist: { files: [{ expand: true, dot: true, cwd: ‘<%= config.app %>’, dest: ‘<%= config.dist %>’, src: [ ‘*.{ico,png,txt}’, ‘.htaccess’, ‘images/{,*/}*.webp’, ‘{,*/}*.html’, ‘styles/fonts/{,*/}*.*’ ] },{ expand: true, dot: true, cwd: ‘bower_components/bootstrap/dist’, // change this for font-awesome src: [‘fonts/*.*’], dest: ‘<%= config.dist %>’ … Read more

WARNING: Tried to load angular more than once. Angular JS

In my case this was due to the following html code: <!doctype html> <html> <head> <meta charset=”utf-8″> <title>Testapp</title> </head> <body ng-app=”testApp”> <main ui-view> <script src=”https://stackoverflow.com/questions/23499853/bower_components/jquery/jquery.js”></script> <script src=”bower_components/angular/angular.js”></script> <script src=”bower_components/angular-ui-router/release/angular-ui-router.js”></script> <script src=”scripts/main.js”></script> </body> </html> As you can see, the <main> is not closed. This led to my variant of ‘WARNING: Tried to load angular more than … Read more

ESLint’s “no-undef” rule is calling my use of Underscore an undefined variable

The official documentation should give you an idea on how to fix this. Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global …*/ comment, or specified in the globals key in the configuration file. The easiest fix would be to add /* global _ */ at … Read more

Grunt on Windows 8: ‘grunt’ is not recognized

I’ve not had any issues with grunt on several different windows 8 machines. If you open the folder: C:\Users\[username]\AppData\Roaming\npm Do you have a file named grunt.cmd in this folder? If not I’d maybe try npm install -g grunt-cli again, maybe from an elevated command prompt. If this exists and you have C:\Users\[username]\AppData\Roaming\npm in your PATH … Read more