forked from DigitalSlideArchive/HistomicsTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
114 lines (114 loc) · 4.1 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
/**
* Copyright 2015 Kitware Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = function (grunt) {
grunt.config.merge({
histomics: {
root: '<%= pluginDir %>/HistomicsTK',
extjs: '<%= histomics.root %>/web_client/js/ext',
extcss: '<%= histomics.root %>/web_client/stylesheets/ext',
extextra: '<%= histomics.root %>/web_client/extra',
npm: '<%= histomics.root %>/node_modules',
external: '<%= histomics.root %>/web_main',
static: '<%= staticDir %>/built/plugins/HistomicsTK'
},
uglify: {
'histomics-main': {
files: [
{
src: [
'<%= histomics.external %>/main.js'
],
dest: '<%= histomics.static %>/histomics.main.min.js'
}
]
}
},
jade: {
'plugin-HistomicsTK': {
options: {
namespace: 'histomicstk.templates'
}
}
},
copy: {
'bootstrap-slider': {
files: [{
'<%= histomics.extjs %>/bootstrap-slider.js': '<%= histomics.npm %>/bootstrap-slider/dist/bootstrap-slider.js',
'<%= histomics.extcss %>/bootstrap-slider.css': '<%= histomics.npm %>/bootstrap-slider/dist/css/bootstrap-slider.css'
}]
},
'bootstrap-colorpicker': {
files: [{
'<%= histomics.extjs %>/bootstrap-colorpicker.js': '<%= histomics.npm %>/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js',
'<%= histomics.extcss %>/bootstrap-colorpicker.css': '<%= histomics.npm %>/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.css'
}, {
expand: true,
cwd: '<%= histomics.npm %>/bootstrap-colorpicker/dist/img',
src: ['bootstrap-colorpicker/*.png'],
dest: '<%= histomics.extextra %>'
}]
},
'backbone.localStorage': {
files: [{
'<%= histomics.extjs %>/backbone.localStorage.js': '<%= histomics.npm %>/backbone.localstorage/backbone.localStorage.js'
}]
},
tinycolor: {
files: [{
'<%= histomics.extjs %>/tinycolor.js': '<%= histomics.npm %>/tinycolor2/tinycolor.js'
}]
}
},
stylus: {
'plugin-HistomicsTK': {
options: {
'include css': true
}
}
},
init: {
'copy:bootstrap-slider': {
dependencies: [
'shell:plugin-HistomicsTK'
]
},
'copy:bootstrap-colorpicker': {
dependencies: [
'shell:plugin-HistomicsTK'
]
},
'copy:backbone.localStorage': {
dependencies: [
'shell:plugin-HistomicsTK'
]
},
'copy:tinycolor': {
dependencies: [
'shell:plugin-HistomicsTK'
]
}
},
default: {
'uglify:histomics-main': {}
},
watch: {
'plugin-histomics-uglify-main': {
files: ['<%= histomics.external %>/**/*.js'],
tasks: ['uglify:histomics-main']
}
}
});
};