diff --git a/resources/static/include.js b/resources/static/include.js index a6aff07d3c165a662b87a0bd1ac3d3a96709dae5..d96a7e2ee606f46a933e2a8a2b131a0b5a8dcb68 120000 --- a/resources/static/include.js +++ b/resources/static/include.js @@ -1 +1 @@ -include_js/include.js \ No newline at end of file +production/include.js \ No newline at end of file diff --git a/resources/views/layout.ejs b/resources/views/layout.ejs index cd2818b7a7a90eb99d37dc768406fe7351289c3a..45ca3212269aca0864c40fe5f00dd3046b21e736 100644 --- a/resources/views/layout.ejs +++ b/resources/views/layout.ejs @@ -13,7 +13,7 @@ <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700,700italic' rel='stylesheet' type='text/css'> <% if (production) { %> <link rel="stylesheet" type="text/css" href="/production/browserid.css"> - <script src="/production/browserid.js"></script> + <script src="/production/<%= locale %>/browserid.js"></script> <% } else { %> <link rel="stylesheet" href="/css/common.css" type="text/css" media="screen"> <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen"> diff --git a/scripts/compress.sh b/scripts/compress.sh index 6195ff5edd11c6ec4443407f337be9e5e2602191..24e19ec7bdec77573ccc1e69dcff6a4c4c21da6b 100755 --- a/scripts/compress.sh +++ b/scripts/compress.sh @@ -78,7 +78,10 @@ echo '****Building BrowserID.org HTML, CSS, and JS****' echo '' #produce the main site js -cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js shared/browserid.js lib/dom-jquery.js lib/module.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/class.js shared/mediator.js shared/tooltip.js shared/validation.js shared/helpers.js shared/screens.js shared/browser-support.js shared/wait-messages.js shared/error-messages.js shared/error-display.js shared/storage.js shared/xhr.js shared/network.js shared/provisioning.js shared/user.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js shared/modules/cookie_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/browserid.uncompressed.js +for locale in $locales; do + cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js i18n/${locale}/client.json shared/gettext.js shared/browserid.js lib/dom-jquery.js lib/module.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/class.js shared/mediator.js shared/tooltip.js shared/validation.js shared/helpers.js shared/screens.js shared/browser-support.js shared/wait-messages.js shared/error-messages.js shared/error-display.js shared/storage.js shared/xhr.js shared/network.js shared/provisioning.js shared/user.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js shared/modules/cookie_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/$locale/browserid.uncompressed.js +done + # produce the main site css cat css/common.css css/style.css css/m.css > $BUILD_PATH/browserid.uncompressed.css @@ -95,9 +98,10 @@ $UGLIFY < $BUILD_PATH/include.uncompressed.js > include.js for locale in `../../../scripts/production_locales`; do mkdir -p $locale $UGLIFY < $BUILD_PATH/$locale/dialog.uncompressed.js > $locale/dialog.js + $UGLIFY < $BUILD_PATH/$locale/browserid.uncompressed.js > $locale/browserid.js done $UGLIFY < $BUILD_PATH/communication_iframe.uncompressed.js > communication_iframe.js -$UGLIFY < $BUILD_PATH/browserid.uncompressed.js > browserid.js + # minify the CSS $UGLIFYCSS $BUILD_PATH/browserid.uncompressed.css > browserid.css