forked from ember-admin/ember-cli-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
118 lines (103 loc) · 3.92 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
compile: {
files: {
'dist/ember-admin.js': [
'src/application/namespace.coffee',
'src/application/dsl/*.coffee',
'src/application/logics/*.coffee',
'src/application/mixins/**/*.coffee',
'src/application/routes/main_route.coffee',
'src/application/config.coffee',
'src/application/navigation.coffee',
'src/application/views/base/actions/base_action_view.coffee',
'src/application/controllers/base/admin_base_controller.coffee',
'src/application/controllers/base/admin_table_view_controller.coffee',
'src/application/forms/*.coffee',
'src/application/helpers/*.coffee',
'src/application/views/**/*.coffee',
'src/application/routes/**/*.coffee',
'src/application/controllers/**/*.coffee',
'src/application/form_config.coffee',
'src/application/adapters/*.coffee'
],
'spec/ember-admin_spec.js': [
'spec/env.coffee',
'spec/**/*.coffee'
],
'dist/ember-admin-resolver.js':[
'src/application/resolver.coffee'
]
}
}
},
emblem: {
compile: {
files: {
'dist/templates.js': ['src/application/templates/ember-admin/**/*.emblem']
},
options: {
root: 'src/application/templates/',
dependencies: {
jquery: 'vendor/jquery.js',
ember: 'vendor/ember.js',
emblem: 'vendor/emblem.js',
handlebars: 'vendor/handlebars.js'
}
}
}
},
uglify: {
options: { mangle: false, compress: false },
dist: {
src: ['dist/ember-admin.js', 'dist/templates.js'],
dest: 'dist/ember-admin.min.js'
}
},
jasmine: {
pivotal: {
src: [
'vendor/jquery.js',
'vendor/handlebars.js',
'vendor/ember.js',
'vendor/ember-data.js',
'src/ember-easyForm.js',
'src/jquery.cookie.js',
'dist/ember-admin.js',
'dist/templates.js'
],
options: {
specs: 'spec/ember-admin_spec.js'
}
}
},
curl: {
ember: {
src: 'http://builds.emberjs.com/canary/ember.js',
dest: 'vendor/ember.js'
},
ember_data: {
src: 'http://builds.emberjs.com/canary/ember-data.js',
dest: 'vendor/ember-data.js'
}
},
sass: {
dist: {
files: {
'dist/ember-admin.css': 'src/ember-admin.scss'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-emblem');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.registerTask('default', ['coffee', 'emblem', 'uglify', 'sass']);
grunt.registerTask('spec', ['coffee', 'emblem', 'jasmine:pivotal']);
grunt.registerTask('update_ember', ['curl:ember', 'curl:ember_data']);
};