-
Notifications
You must be signed in to change notification settings - Fork 31
/
Gruntfile.js
155 lines (150 loc) · 6.56 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
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
/**
* Created by quuyely on 26/12/19.
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ["snomed-interaction-components/dist", "snomed-interaction-components/views/compiled"],
concat: {
options: {
separator: ';'
},
js: {
src: [
'snomed-interaction-components/views/compiled/templates.js',
'snomed-interaction-components/js/conceptExpressions.js',
'snomed-interaction-components/js/conceptDetailsPlugin.js',
'snomed-interaction-components/js/countryIcons.js',
'snomed-interaction-components/js/drawConceptDiagram.js',
'snomed-interaction-components/js/popover.js',
'snomed-interaction-components/js/searchPlugin.js',
'snomed-interaction-components/js/svgdiagrammingv2.js',
'snomed-interaction-components/js/taxonomyPlugin.js',
'snomed-interaction-components/js/refsetPlugin.js',
'snomed-interaction-components/js/favoritesPlugin.js',
'snomed-interaction-components/js/queryPlugin.js',
'snomed-interaction-components/js/util.js',
'snomed-interaction-components/js/dailyBuildPlugin.js',
'snomed-interaction-components/js/communityContentPlugin.js'
],
dest: 'snomed-interaction-components/dist/js/internal.js'
},
externalJs:{
src:[
'external-libs/jquery-3.3.1.min.js',
'external-libs/jquery-ui-1.10.4.custom.min.js',
'external-libs/base64.js',
'external-libs/jquery.svg.js',
'external-libs/jquery.splitter-0.14.0.js',
'external-libs/conduit.min.js',
'external-libs/lodash.js',
'external-libs/postal.min.js',
'external-libs/bootstrap-tour.min.js',
'external-libs/jquery.i18n.properties-min-1.0.9.js',
'external-libs/handlebars.runtime.min-v4.7.8.js',
'external-libs/bootstrap.min.js',
'external-libs/jquery.ui.touch-punch.min.js',
'external-libs/excellentexport.min.js',
'external-libs/notify.js',
'external-libs/clipboard.min.js',
'external-libs/popover-extra-placements.js',
'external-libs/canvas2image.js',
'external-libs/canvg.min.js',
'external-libs/bootstrap-multiselect.js',
'external-libs/jquery.history.js',
'external-libs/ZeroClipboard.js',
'external-libs/datatables.min.js',
'external-libs/jquery.contextMenu.js',
'external-libs/jquery.ui.position.js'
],
dest: 'snomed-interaction-components/dist/js/external.js'
},
combinedJs:{
src:[
'snomed-interaction-components/dist/js/external.js',
'snomed-interaction-components/dist/js/internal.js'
],
dest: 'snomed-interaction-components/dist/js/<%= pkg.name %>.js'
},
css: {
src: 'snomed-interaction-components/css/*.css',
dest: 'snomed-interaction-components/dist/css/<%= pkg.name %>.css'
},
externalCss:{
src:[
"ecl-builder/styles.css",
"css/bootstrap-theme.min.css",
"css/jquery.splitter.css",
"css/jquery-ui-1.10.4.custom.min.css",
"css/bootstrap.min.base.12.css",
"css/bootstrap-tour.css",
"css/popover-extra-placements.css",
"css/animate.css",
"css/bootstrap-multiselect.css",
"css/datatables.min.css",
"css/jquery.contextMenu.css",
'snomed-interaction-components/dist/css/<%= pkg.name %>.css'
],
dest: 'css/external.css'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'snomed-interaction-components/dist/js/<%= pkg.name %>.js',
dest: 'snomed-interaction-components/dist/js/<%= pkg.name %>.min.js'
}
},
cssmin: {
css: {
src: 'snomed-interaction-components/dist/css/<%= pkg.name %>.css',
dest: 'snomed-interaction-components/dist/css/<%= pkg.name %>.min.css'
}
},
handlebars: {
compile: {
options: {
namespace: "JST"
},
files: {
"snomed-interaction-components/views/compiled/templates.js": "snomed-interaction-components/views/**/*.hbs"
}
}
},
jshint: {
all: ['js/**/*.js'],
options: {
reporter: require('jshint-stylish'),
reporterOutput: 'dist/jshint-output.txt'
}
},
copy: {
dev: {
files: [{
src: 'snomed-interaction-components/dist/js/<%= pkg.name %>.min.js',
dest: 'internal-libs/<%= pkg.name %>.min.js',
},
{
src: 'snomed-interaction-components/dist/css/<%= pkg.name %>.min.css',
dest: 'css//<%= pkg.name %>.min.css',
},
{
src: 'node_modules/snomed-ecl-builder/output/*',
dest: 'internal-libs/'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('default', ['clean', 'handlebars', 'concat','uglify', 'cssmin', 'copy']);
};