Spaces:
Running
Running
const __path = require('path'); | |
const CWD = __path.normalize(`${__dirname}/../front`); | |
module.exports = function(grunt) { | |
grunt.loadNpmTasks('grunt-contrib-less'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('default', ['less']); | |
grunt.initConfig({ | |
less: { | |
options: { | |
compress: true, | |
}, | |
dist: { | |
src: `${CWD}/less/style.less`, | |
dest: `${CWD}/dist/style.css` | |
} | |
}, | |
watch: { | |
options: { | |
livereload: true, | |
cwd: CWD, | |
}, | |
files: ["*.html", "less/*", "js-src/**/*"], | |
tasks: 'default' | |
}, | |
}); | |
}; | |