forked from ScoutsGidsenVL/groepsadmin-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
70 lines (62 loc) · 1.75 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
67
68
69
70
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Grunt tasks
less: {
development: {
files: {
'css/bootstrap.css': ['less/bootstrap.less']
},
options: {
compress: true,
yuicompress: true,
optimization: 2,
sourceMap: true,
sourceMapFilename: 'css/bootstrap.css.map', // where Grunt should put the file
sourceMapURL: 'bootstrap.css.map', // the complete url and filename put in the compiled css file
sourceMapBasepath: 'css', // Sets sourcemap base path, defaults to current working directory.
//sourceMapRootpath: '/', // adds this path onto the sourcemap filename and less file paths
}
}
},
watch: {
options: {
livereload: true,
},
// Watch for LESS changes and build CSS automatically
styles: {
// Which files to watch (all .less files recursively in the less directory)
files: ['less/**/*.less'],
tasks: ['less'],
options: {
nospaces: true
}
},/*
// Watch for JS changes.
scripts: {
files: ['js/*.js'],
tasks: ['less::development']
},*/
// Watch html files, just for LiveReload
templates: {
files: ['*.html']
}
},
connect: {
server: {
livereload: true
}
}
});
// Load required modules
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
// Task definitions
grunt.registerTask('default', ['watch']);
grunt.registerTask('serve', [
'connect:server',
'watch'
]);
};