forked from Leantime/leantime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
179 lines (171 loc) · 8.32 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks('grunt-exec');
grunt.initConfig({
uglify: {
app_src: {
options: {
sourceMap: true,
sourceMapName: "public/js/jsSourceMapAppSrc.map",
sourceMapUrl: "jsSourceMapAppSrc.map",
mangle: false
},
src: [
"public/js/app/app.js",
"public/js/app/core/custom.js",
"public/js/app/core/tableHandling.js",
"public/js/app/core/wysiwyg.js",
"app/domain/**/*.js",
"custom/domain/**/*.js",
"app/plugin/**/*.js",
"custom/plugin/**/*.js"
],
dest: "public/js/compiled-app.min.js"
},
base_lib_src: {
options: {
sourceMap: true,
sourceMapName: "public/js/jsSourceMapBaseLib.map",
sourceMapUrl: "jsSourceMapBaseLib.map",
mangle: false
},
src: [
"node_modules/jquery/dist/jquery.js",
"node_modules/jquery-migrate/dist/jquery-migrate.js",
"node_modules/jquery-ui-dist/jquery-ui.js",
"node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js",
"node_modules/moment/moment.js",
"node_modules/js-cookie/dist/js.cookie.js",
"public/js/libs/bootstrap.min.js",
"public/js/libs/bootstrap-timepicker.min.js",
"public/js/libs/bootstrap-fileupload.min.js",
"public/js/libs/jquery.growl.js",
"public/js/libs/slimselect.min.js",
"public/js/libs/chosen.jquery.min.js",
"public/js/libs/jquery.form.js",
"public/js/libs/jquery.tagsinput.min.js",
"public/js/libs/confetti/js/confetti.js"
],
dest: "public/js/compiled-base-libs.min.js"
},
extended_lib_src: {
options: {
sourceMap: true,
sourceMapName: "public/js/jsSourceMapExtendedSrc.map"
, sourceMapUrl: "jsSourceMapExtendedSrc.map",
mangle: false
},
src: [
"node_modules/croppie/croppie.js",
"node_modules/chart.js/dist/chart.js",
"node_modules/chartjs-adapter-moment/dist/chartjs-adapter-moment.js",
"node_modules/packery/dist/packery.pkgd.js",
"node_modules/imagesloaded/imagesloaded.pkgd.js",
"node_modules/tether-shepherd/dist/js/tether.js",
"node_modules/tether-shepherd/dist/js/shepherd.js",
"node_modules/datatables.net/js/jquery.dataTables.js",
"node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.js",
"node_modules/datatables.net-rowreorder/js/dataTables.rowReorder.js",
"node_modules/datatables.net-buttons/js/dataTables.buttons.js",
"node_modules/datatables.net-buttons/js/buttons.html5.js",
"node_modules/datatables.net-buttons/js/buttons.print.js",
"node_modules/datatables.net-buttons/js/buttons.colVis.js",
"node_modules/tinymce/tinymce.js",
"node_modules/tinymce/icons/default/icons.js",
"node_modules/tinymce/jquery.tinymce.js",
"node_modules/tinymce/themes/silver/theme.js",
"node_modules/tinymce/plugins/autolink/plugin.js",
"node_modules/tinymce/plugins/link/plugin.js",
"node_modules/tinymce/plugins/textcolor/plugin.js",
"node_modules/tinymce/plugins/image/plugin.js",
"node_modules/tinymce/plugins/lists/plugin.js",
"node_modules/tinymce/plugins/save/plugin.js",
"node_modules/tinymce/plugins/preview/plugin.js",
"node_modules/tinymce/plugins/media/plugin.js",
"node_modules/tinymce/plugins/searchreplace/plugin.js",
"node_modules/tinymce/plugins/paste/plugin.js",
"node_modules/tinymce/plugins/directionality/plugin.js",
"node_modules/tinymce/plugins/fullscreen/plugin.js",
"node_modules/tinymce/plugins/noneditable/plugin.js",
"node_modules/tinymce/plugins/visualchars/plugin.js",
"node_modules/tinymce/plugins/emoticons/plugin.js",
"node_modules/tinymce/plugins/emoticons/js/emojis.min.js",
"node_modules/tinymce/plugins/template/plugin.js",
"node_modules/tinymce/plugins/advlist/plugin.js",
"node_modules/tinymce/plugins/autoresize/plugin.js",
"node_modules/tinymce/plugins/codesample/plugin.js",
"node_modules/tinymce-mention/mention/plugin.js",
"node_modules/isotope-layout/dist/isotope.pkgd.js",
"node_modules/jstree/dist/jstree.js",
"node_modules/@assuradeurengilde/fontawesome-iconpicker/dist/js/fontawesome-iconpicker.js",
"public/js/libs/tinymce-plugins/helper.js",
"public/js/libs/tinymce-plugins/checklist/index.js",
"public/js/libs/tinymce-plugins/shortlink/index.js",
"public/js/libs/tinymce-plugins/table/plugin.js",
"public/js/libs/tinymce-plugins/bettertable/index.js",
"public/js/libs/tinymce-plugins/collapsibleheaders/index.js",
"public/js/libs/tinymce-plugins/embed/index.js",
"public/js/libs/tinymce-plugins/slashcommands/slashcommands.js",
"public/js/libs/fullcalendar.min.js",
"public/js/libs/simple-color-picker-master/jquery.simple-color-picker.js",
"public/js/libs/simpleGantt/moment.min.js",
"public/js/libs/simpleGantt/snap.svg-min.js",
"public/js/libs/simpleGantt/frappe-gantt.min.js",
"public/js/libs/jquery.nyroModal/js/jquery.nyroModal.custom.js",
"public/js/libs/prism/js/prism.js",
"public/js/libs/uppy/uppy.js",
]
, dest: "public/js/compiled-extended-libs.min.js"
}
}
, jshint: {
options: {
curly: false
, eqeqeq: false
, eqnull: true
, browser: true
, laxcomma: true
, globals: {
jQuery: true
}
, ignores: [
]
}
, app: [
"public/js/app/**/*.js"
]
}
, less: {
dev: {
options: {
compress: true
, yuicompress: true
, optimization: 2
, autoPrefix: ">1%"
, cssComb: "none"
, ieCompat: true
, strictMath: false
, strictUnits: false
, relativeUrls: true
, rootPath: ""
}
, files: {
"public/css/main.css": "public/less/main.less"
}
}
},
exec: {
composer_install: {
cmd: 'composer self-update && composer install --no-dev',
exitCode: [ 0, 255 ]
}
}
});
grunt.registerTask("Build-All", ["less:dev", "uglify", "jshint"]);
grunt.registerTask("Build-App-Src", ["uglify:app_src", "jshint"]);
grunt.registerTask("Build-Base-Lib", ["uglify:base_lib_src"]);
grunt.registerTask("Build-Extended-Src", ["uglify:extended_lib_src"]);
grunt.registerTask("Build-Less-Dev", ["less:dev"]);
};