Skip to content

Instantly share code, notes, and snippets.

@saran87
Created October 21, 2013 09:42
Show Gist options
  • Save saran87/7081248 to your computer and use it in GitHub Desktop.
Save saran87/7081248 to your computer and use it in GitHub Desktop.
// GruntFile.js for Laravel 4 Development
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
"watch": {
"all": {
files: ["public/css/*", "public/js/*"],
tasks: ["clean:all", "less:dev", "concat:dev", "uglify:dev",]
}
},
"clean": {
"all": {
src: ["public/assets"]
}
},
"less": {
"dev": {
options: { yuicompress: true },
files: { "public/assets/css/style.css": "public/css/style.less" }
}
},
"css": {
files: {
"public/assets/css/css-style.css": ["public/css/**/*.css"]
}
},
"concat": {
"dev": {
seperator: ";",
src: ["public/js/*.js"],
dest: "public/assets/js/script.js"
}
},
"uglify": {
"dev": {
files: {
"public/assets/js/script.min.js": ["public/assets/js/script.js"]
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
// grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('build', ["clean:all", "less:dev", "concat:dev", "uglify:dev"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment