Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.