Skip to content

Instantly share code, notes, and snippets.

@edderrd
Created March 30, 2014 15:37
Show Gist options
  • Save edderrd/9874534 to your computer and use it in GitHub Desktop.
Save edderrd/9874534 to your computer and use it in GitHub Desktop.
Sample laravel grunt file
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
less: {
development: {
options: {
paths: ["public/assets/less/*.less"]
}
}
},
coffee: {
glob_to_multiple: {
expand: true,
flatten: true,
cwd: 'public/assets/coffee',
src: ['*.coffee'],
dest: 'public/js',
ext: '.js',
tasks: 'coffee'
}
},
watch: {
js: {
files: ['public/js/*.js'],
options: {
livereload: true,
}
},
sass: {
files: ['public/assets/sass/*.scss'],
options: {
livereload: true,
}
},
less: {
files: ['public/assets/less/*.less'],
options: {
livereload: true,
},
tasks: 'less'
},
css: {
files: ['public/css/*.css'],
options: {
livereload: true,
}
},
coffee: {
files: ['public/assets/coffee/*.coffee'],
tasks: ['coffee']
},
html: {
files: ['app/views/*/*.blade.php'],
options: {
livereload: true,
}
}
}
});
// Load the plugin that provides the "uglify" task.
// grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-less');
// grunt.loadNpmTasks('grunt-notify');
// // Default task(s).
grunt.registerTask('default', ['watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment