forked from harvesthq/Sidetap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
58 lines (55 loc) · 1.32 KB
/
grunt.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
/**
* grunt
* CoffeeScript example
*/
module.exports = function(grunt){
grunt.initConfig({
lint: {
files: ['grunt.js', 'src/*.js']
},
coffee: {
compile: {
options: {
bare: true
},
files: {
'src/sidetap_loader.js': 'src/coffee/sidetap_loader.coffee',
'src/sidetap_standard.js': 'src/coffee/sidetap_standard.coffee',
'src/sidetap_ios.js': 'src/coffee/sidetap_ios.coffee',
'src/sidetap.js': ['src/coffee/sidetap_standard.coffee','src/coffee/sidetap_ios.coffee','src/coffee/sidetap_loader.coffee']
}
}
},
less: {
compile: {
files: {
'src/sidetap.css': 'src/less/sidetap.less',
'src/theme/default/default.css': 'src/theme/default/default.less'
}
}
},
watch: {
dist1: {
files: 'src/coffee/*',
tasks: 'coffee min'
},
dist2: {
files: 'src/less/*',
tasks: 'less'
},
dist3: {
files: 'src/theme/default/*.less',
tasks: 'less'
}
},
min: {
dist: {
src: ['src/sidetap.js'],
dest: 'src/sidetap.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib');
grunt.registerTask('build', 'coffee less min');
grunt.registerTask('default', 'coffee less min');
};