-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
49 lines (46 loc) · 1.17 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
module.exports = function(grunt) {
require('jit-grunt')(grunt);
grunt.initConfig({
'less': {
development: {
options: {
yuicompress: true,
optimization: 2
},
files: {
// Destination file and source file
'dist/got-characters.css': 'src/less/main.less'
}
}
},
'watch': {
styles: {
files: ['src/less/**/*.less'], // Which files to watch
tasks: ['less'],
options: {
nospawn: true
}
}
},
'http-server': {
'dev': {
root: '.',
port: 1337,
// If specified to, for example, "127.0.0.1" the server will
// only be available on that ip.
// Specify "0.0.0.0" to be available everywhere
host: '0.0.0.0',
cache: 0,
showDir : true,
autoIndex: true,
// server default file extension
ext: 'html',
// run in parallel with other tasks
runInBackground: true
}
}
});
grunt.loadNpmTasks('grunt-http-server');
grunt.registerTask('default', ['less', 'watch']);
grunt.registerTask('dev', ['less', 'http-server:dev', 'watch']);
};