Warning: connect.static is not a function Use –force to continue

You have to install connect and serve-static: npm install –save-dev grunt-contrib-connect serve-static And then you have to import serve-static in Gruntfile.js: module.exports = function (grunt) { … var serveStatic = require(‘serve-static’); grunt.initConfig({ … connect: { … livereload: { options: { middleware: function(connect) { return [ serveStatic(‘.tmp’), connect().use(‘/bower_components’, serveStatic(‘./bower_components’)), serveStatic(config.app) ]; } } }

grunt-contrib-copy – ignore folder when copying

Try following Gruntfile.js. It ignores psd directory. Solution found in following question. module.exports = function(grunt) { // Project configuration. grunt.initConfig({ copy: { main: { src: [‘**/*’, ‘!**/psd/**’], expand: true, cwd: ‘dev’, dest: ‘pub’, } } }); // Load the plugin that provides the “copy” task. grunt.loadNpmTasks(‘grunt-contrib-copy’); // Default task(s). grunt.registerTask(‘default’, [‘copy’]); }; example setup. mkdir … Read more

Pass Options to a grunt task while running it

You can use that syntax but it means pass these arguments to the htmlmin task: allFiles, ‘collapse=true’. For example, given the following task: grunt.registerTask(‘so’, function(arg1, arg2) { console.log(arg1 + “, ” + arg2); }); Running: grunt so:barley:test=true Gives the following output: barley, test=true There are other ways to pass parameters/share info described in the faq: … Read more

Why is it recommended to use concat then uglify when the latter can do both?

Running a basic test to see if there is a performance difference between executing concat and then uglify vs. just uglify. package.json { “name”: “grunt-concat-vs-uglify”, “version”: “0.0.1”, “description”: “A basic test to see if we can ditch concat and use only uglify for JS files.”, “devDependencies”: { “grunt”: “^0.4.5”, “grunt-contrib-concat”: “^0.5.0”, “grunt-contrib-uglify”: “^0.6.0”, “load-grunt-tasks”: “^1.0.0”, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)