File size: 563 Bytes
241fed7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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'
		},
	});
};