forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
117 lines (106 loc) · 2.59 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
module.exports = function(grunt) {
grunt.initConfig({
concat: {
options: {
separator: ';\n'
},
dist: {
src: [
'js/_license.js',
// Base
'js/ionic.js',
// Utils
'js/utils/**/*.js',
// Views
'js/views/view.js',
'js/views/scrollView.js',
'js/views/actionSheetView.js',
'js/views/checkboxView.js',
'js/views/headerBarView.js',
'js/views/listView.js',
'js/views/ListViewScroll.js',
'js/views/loadingView.js',
'js/views/modalView.js',
'js/views/navBarView.js',
'js/views/popupView.js',
'js/views/sideMenuView.js',
'js/views/slideBoxView.js',
'js/views/tabBarView.js',
'js/views/toggleView.js',
// Controllers
'js/controllers/viewController.js',
'js/controllers/navController.js',
'js/controllers/sideMenuController.js',
'js/controllers/tabBarController.js'
],
dest: 'dist/js/ionic.js'
},
distAngular: {
src: [
'js/_license.js',
'js/ext/angular/src/ionicAngular.js',
'js/ext/angular/src/service/**/*.js',
'js/ext/angular/src/directive/**/*.js'
],
dest: 'dist/js/ionic-angular.js'
}
},
jshint: {
files: ['Gruntfile.js', 'js/**/*.js', 'test/**/*.js'],
options: {
jshintrc: '.jshintrc'
}
},
uglify: {
dist: {
files: {
'dist/js/ionic.min.js': 'dist/js/ionic.js',
'dist/js/ionic-angular.min.js': 'dist/js/ionic-angular.js'
}
},
options: {
preserveComments: 'some'
}
},
sass: {
dist: {
files: {
'dist/css/ionic.css': 'scss/ionic.scss',
'dist/css/themes/ionic-ios7.css': 'scss/themes/ios7/ionic-ios7.scss'
}
}
},
cssmin: {
dist: {
files: {
'dist/css/ionic.min.css': 'dist/css/ionic.css',
'dist/css/themes/ionic-ios7.min.css': 'dist/css/themes/ionic-ios7.css'
}
}
},
watch: {
scripts: {
files: ['js/**/*.js', 'ext/**/*.js'],
tasks: ['concat'],
options: {
spawn: false
}
},
sass: {
files: ['scss/**/*.scss'],
tasks: ['sass', 'concat'],
options: {
spawn: false
}
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', [
'jshint',
'sass',
'cssmin',
'concat',
'uglify'
]);
};