forked from Addepar/ember-table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
66 lines (64 loc) · 1.42 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
var DIST_FILE = 'ember-table.js';
var DIST_FILE_MIN = 'ember-table.min.js';
var BUILD_TASKS = 'coffee handlebars concat min';
var JS_FILES = [
'build/utils/scrollbar_width_helper.js',
'build/utils/resize_handler.js',
'build/utils/style_bindings.js',
'build/utils/lazy_container_view.js',
'build/utils/utils.js',
'build/templates/table_templates.js',
'build/controllers.js',
'build/row_selection_mixin.js',
'build/views.js',
];
module.exports = function(grunt) {
grunt.initConfig({
clean: {
target: ['build', DIST_FILE, DIST_FILE_MIN]
},
coffee: {
src: {
dir: 'src/',
dest: 'build/'
},
examples: {
dir: 'examples'
}
},
concat: {
dist: {
src: JS_FILES,
dest: DIST_FILE,
separator: ';'
}
},
handlebars: {
dist: {
src: 'src/',
dest: 'build/'
}
},
minispade: {
ember_chart: {
src: 'build',
dest: DIST_FILE,
main: 'table'
}
},
min: {
dist: {
src: [DIST_FILE],
dest: DIST_FILE_MIN,
separator: ';'
}
},
watch: {
files: ['src/**/*.coffee', 'src/**/*.handlebars', 'examples/**/*.coffee'],
tasks: BUILD_TASKS
}
});
grunt.loadTasks('tasks');
grunt.registerTask('default', 'clean ' + BUILD_TASKS);
grunt.registerTask('w', 'clean ' + BUILD_TASKS + ' watch');
};