| module.exports = function(grunt) { |
| // Initializing the configuration object |
| grunt.initConfig({ |
| // Task configuration |
| less: { |
| development: { |
| options: { |
| compress: true, |
| // minifying the result |
| }, |
| files: { |
| // compiling styles.less into styles.css |
| "./public/stylesheets/styles.min.css": "./src/less/styles.less", |
| } |
| } |
| }, |
| |
| watch: { |
| less: { |
| files: ['./src/less/*.less', './src/less/**/*.less'], |
| tasks: ['less'], |
| options: { |
| livereload: true |
| // reloads the browser |
| } |
| }, |
| } |
| }); |
| // Plugin loading |
| grunt.loadNpmTasks('grunt-contrib-watch'); |
| grunt.loadNpmTasks('grunt-contrib-less'); |
| // Task definition |
| grunt.registerTask('default', ['watch']); |
| }; |