-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
64 lines (60 loc) · 1.99 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
module.exports = function(grunt) {
// load all tasks
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// watch files
watch: {
compass: {
files: ['src/main/webapp/style/scss/**/{,*/}*.{scss,sass}'],
tasks: ['compass:server']
}
},
// Compiles Sass to CSS and generates necessary files if requested
compass: {
options: {
sassDir: 'src/main/webapp/style/scss',
cssDir: 'src/main/webapp/style/css',
relativeAssets: false,
assetCacheBuster: false,
raw: 'Sass::Script::Number.precision = 10\nEncoding.default_external = "utf-8"\n'
},
server: {
options: {
sourcemap: true
}
}
},
// localserver config
localserver: {
// multiple task
dev: {
options: {
// the config file
configFile: 'src/test/mock/project_config.cfg',
// the port
port: 8081,
// default is async, if used with [watch], it should be set to false
async: false
}
}
},
ftl2html: {
test: {
options: {
baseDir: '../../../',
sourceRoot: 'src/main/webapp/WEB-INF',
files: [{
ftl: '/tmpl/main.ftl',
tdd: 'src/test/mock/tdd/oglobal.tdd,src/test/mock/tdd/main.tdd'
}, {
ftl: '/tmpl/test1.ftl',
tdd: 'src/test/mock/tdd/oglobal.tdd,src/test/mock/tdd/test1.tdd'
}]
}
}
}
});
// load dev localserver
grunt.loadTasks('tasks');
grunt.registerTask('default', ['localserver:dev', 'watch']);
};