Merge pull request #2089 from dfabulich/master

Add Unicode BOM to browser.js, fixes issue #340 running from file URL.
This commit is contained in:
Sebastian McKenzie 2015-07-31 00:01:51 +01:00
commit 2845913d58

View File

@ -12,8 +12,11 @@ node scripts/cache-templates
node $BROWSERIFY_CMD -e lib/polyfill.js >dist/polyfill.js
node $UGLIFY_CMD dist/polyfill.js >dist/polyfill.min.js
node $BROWSERIFY_CMD lib/api/browser.js -s babel $BROWSERIFY_IGNORE >dist/browser.js
node $UGLIFY_CMD dist/browser.js >dist/browser.min.js
# Add a Unicode BOM so browsers will interpret the file as UTF-8
printf '\xEF\xBB\xBF' > dist/browser.js
node $BROWSERIFY_CMD lib/api/browser.js -s babel $BROWSERIFY_IGNORE >>dist/browser.js
printf '\xEF\xBB\xBF' > dist/browser.min.js
node $UGLIFY_CMD dist/browser.js >>dist/browser.min.js
node $BROWSERIFY_CMD lib/api/node.js --node $BROWSERIFY_IGNORE >dist/node.js