forked from ~ulysseskao/xdashangular

Dennis Kao
2016-04-26 f58eed4ff744969bc10af8ef1c4bed42c1e31eb0
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
buildscript {
    ext {
        grailsVersion = project.grailsVersion
    }
    repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/grails/core" }
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
        // classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.6.4"
        classpath "gradle.plugin.com.craigburke.gradle:karma-gradle:1.4.3"
        classpath "gradle.plugin.com.craigburke.gradle:bower-installer-gradle:2.5.1"
        classpath "org.grails.plugins:hibernate4:5.0.4"
        classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.8.1"
        classpath "org.grails.plugins:views-gradle:1.0.8"
    }
}
 
version "0.1"
group "com.ximple.xdashangular"
 
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.grails-gsp"
apply plugin:"com.craigburke.karma"
apply plugin:"com.craigburke.bower-installer"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.plugins.views-json"
 
ext {
    grailsVersion = project.grailsVersion
    gradleWrapperVersion = project.gradleWrapperVersion
}
 
repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }
}
 
dependencyManagement {
    imports {
        mavenBom "org.grails:grails-bom:$grailsVersion"
    }
    applyMavenExclusions false
}
 
dependencies {
    assets "com.craigburke.angular:angular-template-asset-pipeline:2.3.0"
    assets "com.craigburke.angular:angular-annotate-asset-pipeline:2.4.0"
    assets "com.craigburke:js-closure-wrap-asset-pipeline:1.2.0"
    assets "com.bertramlabs.plugins:less-asset-pipeline:2.8.1"
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-plugin-url-mappings"
    compile "org.grails:grails-plugin-rest"
    compile "org.grails:grails-plugin-codecs"
    compile "org.grails:grails-plugin-interceptors"
    compile "org.grails:grails-plugin-services"
    compile "org.grails:grails-plugin-datasource"
    compile "org.grails:grails-plugin-databinding"
    compile "org.grails:grails-plugin-async"
    compile "org.grails:grails-web-boot"
    compile "org.grails:grails-logging"
    compile "org.grails.plugins:cache"
    compile "org.grails:grails-plugin-gsp"
    compile "org.grails.plugins:hibernate4"
    compile "org.hibernate:hibernate-ehcache"
    compile "org.grails.plugins:views-json"
    console "org.grails:grails-console"
    profile "org.grails.profiles:angular:3.1.5"
    runtime "com.h2database:h2"
    runtime "org.grails.plugins:asset-pipeline"
    testCompile "org.grails:grails-plugin-testing"
    testCompile "org.grails.plugins:geb"
    testCompile "org.grails:grails-datastore-rest-client"
    testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
    testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
}
 
task wrapper(type: Wrapper) {
    gradleVersion = gradleWrapperVersion
}
bower {
    'angular'('1.5.x') {
        source 'angular.js'
        source 'angular.min.js'
    }
    'angular-resource'('1.5.x') {
        source 'angular-resource.js' >> '/angular/'
        source 'angular-resource.min.js' >> '/angular/'
    }
    'angular-mocks'('1.5.x') {
        source 'angular-mocks.js' >> '/angular/'
    }
    'angular-bootstrap'('1.3.x') {
        source 'ui-bootstrap-tpls.js' >> '/angular/'
        source 'ui-bootstrap-tpls.min.js' >> '/angular/'
    }
    'bootstrap'('3.x.x') {
        source 'dist/js/bootstrap.js' >> '/bootstrap/'
        source 'dist/js/bootstrap.min.js' >> '/bootstrap/'
        source 'dist/css/bootstrap.css' >> '/bootstrap/css/'
        source 'dist/css/bootstrap.min.css' >> '/bootstrap/css/'
        source 'dist/css/bootstrap.css.map' >> '/bootstrap/css/'
        source 'dist/css/bootstrap.min.css.map' >> '/bootstrap/css/'
        source 'dist/fonts/**' >> '/bootstrap/fonts/'
    }
 
    'jquery'('2.2.x') {
        source 'dist/jquery.js' >> '/jquery/'
        source 'dist/jquery.min.js' >> '/jquery/'
        source 'dist/jquery.slim.js' >> '/jquery/'
        source 'dist/jquery.slim.min.js' >> '/jquery/'
    }
    'jquery-ui'('1.11.4') {
        source 'jquery-ui.js' >> '/jquery/'
        source 'jquery-ui.min.js' >> '/jquery/'
    }
    'angular-http-auth'('1.3.x') {
        source 'src/http-auth-interceptor.js' >> '/angular/'
    }
    'angular-http-auth-gui'('1.x.x') {
        source 'dist/http-auth-gui-interceptor.js' >> '/angular/'
        source 'dist/http-auth-gui-interceptor.min.js' >> '/angular/'
    }
    'ui-router'('0.2.x') {
        source 'release/angular-ui-router.js' >> '/angular/'
        source 'release/angular-ui-router.min.js' >> '/angular/'
    }
    'json3'('3.3.x') {
        source 'lib/json3.js' >> '/json3/'
        source 'lib/json3.min.js' >> '/json3/'
    }
    'es5-shim'('4.5.x') {
        source 'es5-shim.js' >> '/es5/'
        source 'es5-shim.min.js' >> '/es5/'
    }
    //
    'Chart.js'('1.1.1') {
        source 'Chart.js' >> '/Chart.js/'
        source 'Chart.min.js' >> '/Chart.js/'
    }
    'flot'('0.8.3') {
        source 'jquery.flot.*'
        source 'excanvas.js'
        source 'excanvas.min.js'
    }
    'raphael'('2.1.4') {
        source 'raphael.js' >> '/raphael/'
        source 'raphael.min.js' >> '/raphael/'
    }
    'morrisjs'('0.5.1') {
        source 'morris.css' >> '/morris/'
        source 'morris.js' >> '/morris/'
    }
    'jquery-sparkline'('2.1.3') {
        source 'dist/jquery-sparkline.js' >> '/jquery/'
        source 'dist/jquery-sparkline.min.js' >> '/jquery/'
    }
    // form
    'seiyria-bootstrap-slider'('5.2.6') {
        source 'js/bootstrap-slider.js' >> '/bootstrap/'
        source 'dist/bootstrap-slider.min.js' >> '/bootstrap/'
        source 'css/bootstrap-slider.css' >> '/bootstrap/'
        source 'dist/css/bootstrap-slider.min.css' >> '/bootstrap/'
    }
    'ion.rangeSlider'('2.1.2')
    'bootstrap-datepicker'('1.6.0') {
        source 'dist/js/bootstrap-datepicker.js' >> '/bootstrap/'
        source 'dist/js/bootstrap-datepicker.min.js' >> '/bootstrap/'
        source 'dist/css/bootstrap-datepicker3.css' >> '/bootstrap/'
        source 'dist/css/bootstrap-datepicker3.min.css' >> '/bootstrap/'
        source 'dist/locales/**' >> '/bootstrap/datepicker-locales/'
    }
    'bootstrap-daterangepicker'('2.1.19') {
        source 'daterangepicker.css' >> '/bootstrap/'
        source 'daterangepicker.js' >> '/bootstrap/'
    }
    'bootstrap-timepicker'('0.5.2') {
        source 'js/bootstrap-timepicker.js' >> '/bootstrap/'
    }
    'mjolnic-bootstrap-colorpicker'('2.3.0') {
        source 'dist/js/bootstrap-colorpicker.js' >> '/bootstrap/'
        source 'dist/js/bootstrap-colorpicker.min.js' >> '/bootstrap/'
        source 'dist/css/bootstrap-colorpicker.css' >> '/bootstrap/'
        source 'dist/css/bootstrap-colorpicker.min.css' >> '/bootstrap/'
    }
    'jquery-icheck'('1.0.2') {
        source 'icheck.js' >> '/jquery/'
        source 'icheck.min.js' >> '/jquery/'
        source 'skins/**' >> '/jquery/icheck/skins/'
    }
    'moment'('2.13.0')
    'jquery.inputmask'('3.1.0') {
        source 'dist/**' >> '/jquery/'
    }
    // editor
    'wysihtml5x'('0.5.x') {
        source 'dist/**' >> '/wysihtml5x/'
    }
    'ckeditor'('4.5.x') {
        source '**'
    }
    // other
    'datatables'('1.10.11') {
        source 'media/css/**' >> '/datatables/'
        source 'media/js/**' >> '/datatables/'
        source 'media/images/**' >> '/datatables/'
    }
    'fullcalendar'('2.6.1') {
        source 'dist/**' >> '/fullcalendar/'
    }
    'jquery-knob'('1.2.13') {
        source 'js/jquery.knob.js' >> '/jquery/'
        source 'dist/jquery.knob.min.js' >> '/jquery/'
    }
    'bower-jvectormap'('1.2.2') {
        source 'jquery-jvectormap-1.2.2.css' >> '/jquery/'
        source 'jquery-jvectormap-1.2.2.min.js' >> '/jquery/'
        source 'jquery-jvectormap-world-mill-en.js' >> '/jquery/'
    }
    'slimScroll'('1.3.3') {
        source 'jquery.slimscroll.js' >> '/jquery/'
        source 'jquery.slimscroll.min.js' >> '/jquery/'
    }
    'pace'('1.0.2') {
        source 'pace.js' >> '/pace/'
        source 'pace.min.js' >> '/pace/'
    }
 
    // map
    'ol3-bower'('3.14.x') {
        source 'ol.js' >> '/ol3/'
        source 'ol.css' >> '/ol3/'
        source 'ol-debug.js' >> '/ol3/'
    }
    'lodash'('4.11.1') {
        source 'dist/**' >> '/lodash/'
    }
    // 'backbone'('1.3.3')
    /*
    'jointjs'('v0.9.7') {
        excludes 'jquery'
    }
    */
    //
    'fastclick'('1.0.6')
    'select2'('4.0.2') {
        source 'dist/css/**' >> '/select2/'
        source 'dist/js/**' >> '/select2/'
    }
    'jquery-sparkline'('2.1.3') {
        source 'dist/**' >> '/jquery/'
    }
    'ocLazyLoad'('1.0.9') {
        source 'dist/**' >> '/ocLazyLoad/'
    }
    'angular-websocket'('v1.1.0') {
        source 'dist/**' >> '/angular/'
    }
 
    'angular-cookies'('1.5.x') {
        source 'angular-cookies.js' >> '/angular/'
        source 'angular-cookies.min.js' >> '/angular/'
    }
    'angular-sanitize'('1.5.x') {
        source 'angular-sanitize.js' >> '/angular/'
        source 'angular-sanitize.min.js' >> '/angular/'
    }
    'angular-animate'('1.5.x') {
        source 'angular-animate.js' >> '/angular/'
        source 'angular-animate.min.js' >> '/angular/'
    }
    'angular-touch'('1.5.x') {
        source 'angular-touch.js' >> '/angular/'
        source 'angular-touch.min.js' >> '/angular/'
    }
    'angular-route'('1.5.x') {
        source 'angular-route.js' >> '/angular/'
        source 'angular-route.min.js' >> '/angular/'
    }
    'font-awesome'('4.6.1') {
        source 'css/**' >> '/font-awesome/css/'
        source 'fonts/**' >> '/font-awesome/fonts/'
        source 'less/font-awesome.less' >> '/font-awesome/'
        source 'scss/font-awesome.scss' >> '/font-awesome/'
    }
    'angular-loading-bar'('0.9.0') {
        source 'build/**' >> '/angular/'
    }
    'angular-toggle-switch'('1.3.x') {
        source 'angular-toggle-switch.js' >> '/angular/'
        source 'angular-toggle-switch.min.js' >> '/angular/'
        source 'angular-toggle-switch.css' >> '/angular/'
        source 'angular-toggle-switch-bootstrap.css' >> '/angular/'
    }
    'metisMenu'('2.5.0') {
        source 'dist/**' >> '/metisMenu/'
    }
    /*
    'angular-chart.js'('1.0.0-alpha4') {
        excludes 'angular'
    }
    */
    'angular-scenario'('1.5.x') {
        source 'angular-scenario.js' >> '/angular/'
        source 'jstd-scenario-adapter.js' >> '/angular/'
        source 'jstd-scenario-adapter-config.js' >> '/angular/'
    }
    'ionicons'('2.0.1') {
        source 'css/**' >> '/ionicons/css/'
        source 'fonts/**' >> '/ionicons/fonts/'
    }
    'html5shiv'('3.7.3') {
        source 'dist/**' >> '/html5shiv/'
    }
    'respond'('1.4.2') {
        source 'dest/**' >> '/respond/'
    }
    /*
    'bootstrap3-wysihtml5-bower'('0.3.3') {
        source 'dist/**' >> '/bootstrap3-wysihtml5/'
    }
    */
}
 
karma {
    dependencies(['karma-wrap-preprocessor'])
 
    profile 'angularJS'
 
    preprocessors = [
        'grails-app/assets/javascripts/**/*.js': ['wrap']
    ]
 
    wrapPreprocessor = [
        template: "(function () { 'use strict';  <%= contents %> })()"
    ]
}
 
assets {
    minifyJs = true
    minifyCss = true
}