Skip to content

Instantly share code, notes, and snippets.

@trullock
Last active August 29, 2015 13:56
Show Gist options
  • Save trullock/8920645 to your computer and use it in GitHub Desktop.
Save trullock/8920645 to your computer and use it in GitHub Desktop.
@import "one.less";
@import "two.less";
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-robocopy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['watch']);
grunt.registerTask('build', ['clean', 'robocopy']);
grunt.initConfig({
less: {
development: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
"src/all.css": "src/all.less"
}
}
},
clean: ['build'],
robocopy: {
options: {
source: 'src',
destination: 'build',
files: ['*.html', '*.png', '*.jpg', '*.gif', '*.css', '*.ico'],
copy: {
mirror: true
},
retry: {
count: 2,
wait: 3
},
}
},
watch: {
styles: {
files: ['src/*.less'],
tasks: ['less'],
options: {
nospawn: true
}
}
}
});
};
one {
background: green;
}
two {
background: blue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment