diff --git a/README.md b/README.md index 3be02f9..8bd29e8 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,13 @@ Install from [NPM]([npm-url]): npm install d2l-intl ``` -Or include it in your application as UMD/CommonJs from the Brightspace CDN: +Or include it in your application as UMD/CommonJs or as a global variable from the Brightspace CDN: ```html - + + + + ``` **Note about Polymer:** If you're using [Polymer](https://www.polymer-project.org) to write a web component or application, use [d2l-localize-behavior](https://github.com/BrightspaceUI/localize-behavior) instead. diff --git a/package.json b/package.json index 01b0e02..e9ef17b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "main": "src/index.js", "scripts": { "prebrowserify": "rimraf dist && mkdir dist", - "browserify": "browserify -g uglifyify -t ./build/shrink-json -s d2lIntl ./src/index.js > ./dist/Intl.js", + "browserify": "npm run browserify:umd && npm run browserify:global", + "browserify:umd": "browserify -g uglifyify -t ./build/shrink-json -s d2lIntl ./src/index.js > ./dist/d2l-intl.js", + "browserify:global": "browserify -g uglifyify -p deumdify -t ./build/shrink-json -s d2lIntl ./src/index.js > ./dist/d2l-intl-global.js", "lint": "eslint src test build", "test:unit": "istanbul cover node_modules/mocha/bin/_mocha -- --recursive", "test": "npm run lint -s && npm run test:unit -s", @@ -37,6 +39,7 @@ "browserify": "^14.5.0", "chai": "^4.1.2", "coveralls": "^3.0.0", + "deumdify": "^1.2.4", "eslint": "^4.1.2", "eslint-config-brightspace": "^0.4.0", "frau-publisher": "^2.6.2",