Skip to content

Commit

Permalink
Merge c5e0458 into 8e25068
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed Dec 1, 2017
2 parents 8e25068 + c5e0458 commit 2610632
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<script src="https://s.brightspace.com/lib/d2l-intl/{version}/Intl.js"></script>
<!-- UMD/CommonJS -->
<script src="https://s.brightspace.com/lib/d2l-intl/{version}/d2l-intl.js"></script>
<!-- global "d2lIntl" variable -->
<script src="https://s.brightspace.com/lib/d2l-intl/{version}/d2l-intl-global.js"></script>
```

**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.
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 2610632

Please sign in to comment.