Gruntfile.js 712 B

123456789101112131415161718192021222324252627282930
  1. module.exports = function(grunt) {
  2. grunt.loadNpmTasks('grunt-contrib-less');
  3. require('jit-grunt')(grunt);
  4. grunt.initConfig({
  5. less: {
  6. development: {
  7. options: {
  8. compress: true, // change this when going to production
  9. yuicompress: true, // change this when going to production
  10. optimization: 2
  11. },
  12. files: {
  13. "main.css": "less/main.less" // destination file and source file
  14. }
  15. }
  16. },
  17. watch: {
  18. styles: {
  19. files: ['less/*.less'], // which files to watch
  20. tasks: ['less'],
  21. options: {
  22. nospawn: true
  23. }
  24. }
  25. }
  26. });
  27. grunt.registerTask('default', ['less', 'watch']);
  28. };