diff options
author | NavaL <ayoyo@thoughtworks.com> | 2016-03-22 11:25:24 +0100 |
---|---|---|
committer | NavaL <ayoyo@thoughtworks.com> | 2016-03-22 11:30:06 +0100 |
commit | 48b41c39c1b61dee262955fe09b062355833c268 (patch) | |
tree | cbf02e864103593a08b02d492e81b2092464efce /web-ui/config | |
parent | 4a7275b7ddcf214af20216cdd85122e2e83c028f (diff) |
removed minified js libraries before our minification
expressly added non-zero exit code if minification fails
upgraded minify version
Issue #655
Diffstat (limited to 'web-ui/config')
-rw-r--r-- | web-ui/config/package.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/web-ui/config/package.sh b/web-ui/config/package.sh index 8daa263d..165eeff3 100644 --- a/web-ui/config/package.sh +++ b/web-ui/config/package.sh @@ -45,31 +45,34 @@ bower_components/font-awesome/fonts/* \ ../dist cd - -# prepend -comma and space- to concatenated app js so that minify does not blow up -echo '; ' | cat - .tmp/app.concatenated.js > /tmp/out && mv /tmp/out .tmp/app.concatenated.js - # concat js files and minify for app.min.js cat \ app/bower_components/modernizr/modernizr.js \ app/bower_components/lodash/dist/lodash.js \ app/bower_components/jquery/dist/jquery.js \ -app/bower_components/jquery-ui/jquery-ui.min.js \ +app/bower_components/jquery-ui/jquery-ui.js \ app/bower_components/jquery-file-upload/js/jquery.fileupload.js \ app/js/lib/highlightRegex.js \ -app/bower_components/handlebars/handlebars.min.js \ -app/bower_components/typeahead.js/dist/typeahead.bundle.min.js \ +app/bower_components/handlebars/handlebars.js \ +app/bower_components/typeahead.js/dist/typeahead.bundle.js \ app/bower_components/foundation/js/foundation.js \ app/bower_components/foundation/js/foundation/foundation.reveal.js \ app/bower_components/foundation/js/foundation/foundation.offcanvas.js \ app/js/foundation/initialize_foundation.js \ -app/bower_components/iframe-resizer/js/iframeResizer.min.js \ +app/bower_components/iframe-resizer/js/iframeResizer.js \ .tmp/app.concatenated.js > dist/app.js node_modules/.bin/minify dist/app.js > dist/app.min.js rm dist/app.js +if [ ! -s dist/app.min.js ] +then +echo "Minification failed!" +exit 1; +fi + # concat js files and minify for sandbox.min.js cat \ app/js/sandbox.js \ -app/bower_components/iframe-resizer/js/iframeResizer.contentWindow.min.js > dist/sandbox.js +app/bower_components/iframe-resizer/js/iframeResizer.contentWindow.js > dist/sandbox.js node_modules/.bin/minify dist/sandbox.js > dist/sandbox.min.js rm dist/sandbox.js |