-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·66 lines (51 loc) · 1.33 KB
/
Gruntfile.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*global module:true */
module.exports = function (grunt) {
'use strict';
var page = '.';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
dev: {
files: [
{ src: page + '/less/main.less', dest: 'css/main.css' }
]
}
},
connect: {
server: {
options: {
hostname: '*',
port: 8050,
open: 'http://127.0.0.1:8050/index.html',
base: '.',
livereload: true
}
}
},
watch: {
options: {
forever: true,
livereload: true,
atBegin: true
},
less: {
options: {
livereload: false
},
files: [page + "/less/**/*.less"],
tasks: ['less:dev']
},
css: {
files: ['css/*.css'],
tasks: []
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', [
'connect',
'watch'
]);
};