mirror of https://github.com/portainer/portainer
chore(build-system): use regular vendor files, ignore (pre)minified (#1475)
parent
9e47aedbe6
commit
f0621cb09c
13
gruntfile.js
13
gruntfile.js
|
@ -12,7 +12,7 @@ module.exports = function (grunt) {
|
|||
|
||||
grunt.registerTask('default', ['eslint', 'build']);
|
||||
grunt.registerTask('before-copy', [
|
||||
'vendor:',
|
||||
'vendor',
|
||||
'html2js',
|
||||
'useminPrepare:release',
|
||||
'concat',
|
||||
|
@ -38,7 +38,7 @@ module.exports = function (grunt) {
|
|||
'clean:app',
|
||||
'shell:buildBinary:linux:' + arch,
|
||||
'shell:downloadDockerBinary:linux:' + arch,
|
||||
'vendor:regular',
|
||||
'vendor',
|
||||
'html2js',
|
||||
'useminPrepare:dev',
|
||||
'concat',
|
||||
|
@ -55,20 +55,19 @@ module.exports = function (grunt) {
|
|||
grunt.registerTask('clear', ['clean:app']);
|
||||
|
||||
// Load content of `vendor.yml` to src.jsVendor, src.cssVendor and src.angularVendor
|
||||
grunt.registerTask('vendor', 'vendor:<minified|regular>', function(min) {
|
||||
// Argument `min` defaults to 'minified'
|
||||
var minification = (min === '') ? 'minified' : min;
|
||||
grunt.registerTask('vendor', function() {
|
||||
var vendorFile = grunt.file.readYAML('vendor.yml');
|
||||
for (var filelist in vendorFile) {
|
||||
if (vendorFile.hasOwnProperty(filelist)) {
|
||||
var list = vendorFile[filelist][minification];
|
||||
var list = vendorFile[filelist];
|
||||
// Check if any of the files is missing
|
||||
for (var itemIndex in list) {
|
||||
if (list.hasOwnProperty(itemIndex)) {
|
||||
var item = list[itemIndex];
|
||||
var item = 'node_modules/'+list[itemIndex];
|
||||
if (!grunt.file.exists(item)) {
|
||||
grunt.fail.warn('Dependency file ' + item + ' not found.');
|
||||
}
|
||||
list[itemIndex] = item;
|
||||
}
|
||||
}
|
||||
// If none is missing, save the list
|
||||
|
|
159
vendor.yml
159
vendor.yml
|
@ -1,112 +1,55 @@
|
|||
---
|
||||
js:
|
||||
regular:
|
||||
- node_modules/jquery/dist/jquery.js
|
||||
- node_modules/bootstrap/dist/js/bootstrap.js
|
||||
- node_modules/bootbox/bootbox.js
|
||||
- node_modules/filesize/lib/filesize.js
|
||||
- node_modules/lodash/lodash.js
|
||||
- node_modules/moment/moment.js
|
||||
- node_modules/chart.js/dist/Chart.js
|
||||
- node_modules/splitargs/src/splitargs.js
|
||||
- node_modules/toastr/toastr.js
|
||||
- node_modules/xterm/dist/xterm.js
|
||||
- node_modules/xterm/dist/addons/fit/fit.js
|
||||
- node_modules/js-yaml/dist/js-yaml.js
|
||||
- node_modules/codemirror/lib/codemirror.js
|
||||
- node_modules/codemirror/mode/yaml/yaml.js
|
||||
- node_modules/codemirror/addon/lint/lint.js
|
||||
- node_modules/codemirror/addon/lint/yaml-lint.js
|
||||
- node_modules/codemirror/addon/display/placeholder.js
|
||||
minified:
|
||||
- node_modules/jquery/dist/jquery.min.js
|
||||
- node_modules/bootstrap/dist/js/bootstrap.min.js
|
||||
- node_modules/bootbox/bootbox.js
|
||||
- node_modules/filesize/lib/filesize.js
|
||||
- node_modules/lodash/lodash.min.js
|
||||
- node_modules/moment/min/moment.min.js
|
||||
- node_modules/chart.js/dist/Chart.min.js
|
||||
- node_modules/splitargs/src/splitargs.js
|
||||
- node_modules/toastr/build/toastr.min.js
|
||||
- node_modules/xterm/dist/xterm.js
|
||||
- node_modules/xterm/dist/addons/fit/fit.js
|
||||
- node_modules/js-yaml/dist/js-yaml.min.js
|
||||
- node_modules/codemirror/lib/codemirror.js
|
||||
- node_modules/codemirror/mode/yaml/yaml.js
|
||||
- node_modules/codemirror/addon/lint/lint.js
|
||||
- node_modules/codemirror/addon/lint/yaml-lint.js
|
||||
- node_modules/codemirror/addon/display/placeholder.js
|
||||
- 'jquery/dist/jquery.js'
|
||||
- 'bootstrap/dist/js/bootstrap.js'
|
||||
- 'bootbox/bootbox.js'
|
||||
- 'filesize/lib/filesize.js'
|
||||
- 'lodash/lodash.js'
|
||||
- 'moment/moment.js'
|
||||
- 'chart.js/dist/Chart.js'
|
||||
- 'splitargs/src/splitargs.js'
|
||||
- 'toastr/toastr.js'
|
||||
- 'xterm/dist/xterm.js'
|
||||
- 'xterm/dist/addons/fit/fit.js'
|
||||
- 'js-yaml/dist/js-yaml.js'
|
||||
- 'codemirror/lib/codemirror.js'
|
||||
- 'codemirror/mode/yaml/yaml.js'
|
||||
- 'codemirror/addon/lint/lint.js'
|
||||
- 'codemirror/addon/lint/yaml-lint.js'
|
||||
- 'codemirror/addon/display/placeholder.js'
|
||||
css:
|
||||
regular:
|
||||
- node_modules/bootstrap/dist/css/bootstrap.css
|
||||
- node_modules/rdash-ui/dist/css/rdash.css
|
||||
- node_modules/isteven-angular-multiselect/isteven-multi-select.css
|
||||
- node_modules/ui-select/dist/select.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-brands.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-regular.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-solid.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fontawesome.css
|
||||
- node_modules/toastr/build/toastr.css
|
||||
- node_modules/xterm/dist/xterm.css
|
||||
- node_modules/angularjs-slider/dist/rzslider.css
|
||||
- node_modules/codemirror/lib/codemirror.css
|
||||
- node_modules/codemirror/addon/lint/lint.css
|
||||
- node_modules/angular-json-tree/dist/angular-json-tree.css
|
||||
- node_modules/angular-loading-bar/build/loading-bar.css
|
||||
minified:
|
||||
- node_modules/bootstrap/dist/css/bootstrap.min.css
|
||||
- node_modules/rdash-ui/dist/css/rdash.min.css
|
||||
- node_modules/isteven-angular-multiselect/isteven-multi-select.css
|
||||
- node_modules/ui-select/dist/select.min.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-brands.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-regular.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-solid.css
|
||||
- node_modules/@fortawesome/fontawesome-free-webfonts/css/fontawesome.css
|
||||
- node_modules/toastr/build/toastr.min.css
|
||||
- node_modules/xterm/dist/xterm.css
|
||||
- node_modules/angularjs-slider/dist/rzslider.min.css
|
||||
- node_modules/codemirror/lib/codemirror.css
|
||||
- node_modules/codemirror/addon/lint/lint.css
|
||||
- node_modules/angular-json-tree/dist/angular-json-tree.css
|
||||
- node_modules/angular-loading-bar/build/loading-bar.min.css
|
||||
- 'bootstrap/dist/css/bootstrap.css'
|
||||
- 'rdash-ui/dist/css/rdash.css'
|
||||
- 'isteven-angular-multiselect/isteven-multi-select.css'
|
||||
- 'ui-select/dist/select.css'
|
||||
- '@fortawesome/fontawesome-free-webfonts/css/fa-brands.css'
|
||||
- '@fortawesome/fontawesome-free-webfonts/css/fa-regular.css'
|
||||
- '@fortawesome/fontawesome-free-webfonts/css/fa-solid.css'
|
||||
- '@fortawesome/fontawesome-free-webfonts/css/fontawesome.css'
|
||||
- 'toastr/build/toastr.css'
|
||||
- 'xterm/dist/xterm.css'
|
||||
- 'angularjs-slider/dist/rzslider.css'
|
||||
- 'codemirror/lib/codemirror.css'
|
||||
- 'codemirror/addon/lint/lint.css'
|
||||
- 'angular-json-tree/dist/angular-json-tree.css'
|
||||
- 'angular-loading-bar/build/loading-bar.css'
|
||||
angular:
|
||||
regular:
|
||||
- node_modules/angular/angular.js
|
||||
- node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js
|
||||
- node_modules/angular-cookies/angular-cookies.js
|
||||
- node_modules/angular-google-analytics/dist/angular-google-analytics.js
|
||||
- node_modules/angular-jwt/dist/angular-jwt.js
|
||||
- node_modules/angular-local-storage/dist/angular-local-storage.js
|
||||
- node_modules/angular-messages/angular-messages.js
|
||||
- node_modules/angular-resource/angular-resource.js
|
||||
- node_modules/angular-sanitize/angular-sanitize.js
|
||||
- node_modules/ui-select/dist/select.js
|
||||
- node_modules/@uirouter/angularjs/release/angular-ui-router.js
|
||||
- node_modules/angular-utils-pagination/dirPagination.js
|
||||
- node_modules/ng-file-upload/dist/ng-file-upload.js
|
||||
- node_modules/angularjs-slider/dist/rzslider.js
|
||||
- node_modules/isteven-angular-multiselect/isteven-multi-select.js
|
||||
- node_modules/angular-json-tree/dist/angular-json-tree.js
|
||||
- node_modules/angular-loading-bar/build/loading-bar.js
|
||||
- node_modules/angularjs-scroll-glue/src/scrollglue.js
|
||||
- node_modules/angular-clipboard/angular-clipboard.js
|
||||
minified:
|
||||
- node_modules/angular/angular.min.js
|
||||
- node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js
|
||||
- node_modules/angular-cookies/angular-cookies.min.js
|
||||
- node_modules/angular-google-analytics/dist/angular-google-analytics.min.js
|
||||
- node_modules/angular-jwt/dist/angular-jwt.min.js
|
||||
- node_modules/angular-local-storage/dist/angular-local-storage.min.js
|
||||
- node_modules/angular-messages/angular-messages.min.js
|
||||
- node_modules/angular-resource/angular-resource.min.js
|
||||
- node_modules/angular-sanitize/angular-sanitize.min.js
|
||||
- node_modules/ui-select/dist/select.min.js
|
||||
- node_modules/@uirouter/angularjs/release/angular-ui-router.min.js
|
||||
- node_modules/angular-utils-pagination/dirPagination.js
|
||||
- node_modules/ng-file-upload/dist/ng-file-upload.min.js
|
||||
- node_modules/angularjs-slider/dist/rzslider.min.js
|
||||
- node_modules/isteven-angular-multiselect/isteven-multi-select.js
|
||||
- node_modules/angular-json-tree/dist/angular-json-tree.min.js
|
||||
- node_modules/angular-loading-bar/build/loading-bar.min.js
|
||||
- node_modules/angularjs-scroll-glue/src/scrollglue.js
|
||||
- node_modules/angular-clipboard/angular-clipboard.js
|
||||
- 'angular/angular.js'
|
||||
- 'angular-ui-bootstrap/dist/ui-bootstrap-tpls.js'
|
||||
- 'angular-cookies/angular-cookies.js'
|
||||
- 'angular-google-analytics/dist/angular-google-analytics.js'
|
||||
- 'angular-jwt/dist/angular-jwt.js'
|
||||
- 'angular-local-storage/dist/angular-local-storage.js'
|
||||
- 'angular-messages/angular-messages.js'
|
||||
- 'angular-resource/angular-resource.js'
|
||||
- 'angular-sanitize/angular-sanitize.js'
|
||||
- 'ui-select/dist/select.js'
|
||||
- '@uirouter/angularjs/release/angular-ui-router.js'
|
||||
- 'angular-utils-pagination/dirPagination.js'
|
||||
- 'ng-file-upload/dist/ng-file-upload.js'
|
||||
- 'angularjs-slider/dist/rzslider.js'
|
||||
- 'isteven-angular-multiselect/isteven-multi-select.js'
|
||||
- 'angular-json-tree/dist/angular-json-tree.js'
|
||||
- 'angular-loading-bar/build/loading-bar.js'
|
||||
- 'angularjs-scroll-glue/src/scrollglue.js'
|
||||
- 'angular-clipboard/angular-clipboard.js'
|
||||
|
|
Loading…
Reference in New Issue