Skip to content

Commit

Permalink
Update readme and package.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Willemsen committed Nov 16, 2020
1 parent 3f9a863 commit a6c213b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ There is some very simple retry logic baked into each request in the case that t

Two browser-ready scripts are provided:

- [dist/pdjs.js](https://raw.githubusercontent.com/PagerDuty/pdjs/2.0/dist/pdjs.js): For browsers supporting `fetch`.
- [dist/pdjs-legacy.js](https://raw.githubusercontent.com/PagerDuty/pdjs/2.0/dist/pdjs-legacy.js): For older browsers requiring a `fetch` polyfill -- mostly IE 11.
- [dist/pdjs.js](https://raw.githubusercontent.com/PagerDuty/pdjs/main/dist/pdjs.js): For browsers supporting `fetch`.
- [dist/pdjs-legacy.js](https://raw.githubusercontent.com/PagerDuty/pdjs/maindist/pdjs-legacy.js): For older browsers requiring a `fetch` polyfill -- mostly IE 11.

Either of these files can be used by copying them into your project and including them directly, with all functions namespaced `PagerDuty`:

```html
<script src="pdjs.js"></script>
<script src="https://raw.githubusercontent.com/PagerDuty/pdjs/main/dist/pdjs.js"></script>
<script>
PagerDuty.api({token: 'someToken1234567890', endpoint: '/incidents'})
.then(response => console.log(response.data))
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "pdjs",
"name": "@pagerduty/pdjs",
"version": "2.0.0",
"description": "A new simple JavaScript wrapper for the PagerDuty API",
"main": "build/src/index.js",
Expand All @@ -8,7 +8,9 @@
"build/src"
],
"license": "Apache-2.0",
"keywords": [],
"keywords": [
"pagerduty"
],
"scripts": {
"build": "tsc && webpack",
"test": "jest",
Expand Down

0 comments on commit a6c213b

Please sign in to comment.