forked from soyjavi/QuoJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrunt.js
67 lines (55 loc) · 1.6 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
59
60
61
62
63
64
65
66
67
module.exports = function(grunt) {
grunt.initConfig({
pkg: '<json:package/component.json>',
meta: {
file: "quo",
banner: '/* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' +
' <%= pkg.homepage %>\n' +
' Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>' +
' - Licensed <%= _.pluck(pkg.license, "type").join(", ") %> */'
},
resources: {
coffee: ['src/**/*.coffee', 'spec/**/*.coffee'],
js: ['build/**/quo.js',
'build/**/quo.core.js',
'build/**/quo.environment.js',
'build/**/quo.query.js',
'build/**/quo.style.js',
'build/**/quo.element.js',
'build/**/quo.output.js',
'build/**/quo.ajax.js',
'build/**/quo.events.js',
'build/**/quo.gestures.js']
},
coffee: {
app: {
src: ['<config:resources.coffee>'],
dest: 'build',
options: {
bare: true,
preserve_dirs: true
}
}
},
concat: {
js: {
src: ['<banner>', '<config:resources.js>'],
dest: 'package/<%=meta.file%>.debug.js'
}
},
min: {
js: {
src: ['<banner>', 'package/<%=meta.file%>.debug.js'],
dest: 'package/<%=meta.file%>.js'
}
},
watch: {
files: ['<config:resources.coffee>'],
tasks: 'coffee concat min'
},
uglify: {}
});
grunt.loadNpmTasks('grunt-coffee');
// Default task.
grunt.registerTask('default', 'coffee concat min');
};