Skip to content

Instantly share code, notes, and snippets.

@marcelosantos
Forked from edderrd/Gruntfile.js
Created April 27, 2018 12:40
Show Gist options
  • Save marcelosantos/20e7b2110167e099412a286380956d80 to your computer and use it in GitHub Desktop.
Save marcelosantos/20e7b2110167e099412a286380956d80 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