Skip to content

Commit 65483d8

Browse files
committed
feat: remove deps/use indexdb
1 parent 0bd693b commit 65483d8

16 files changed

Lines changed: 2611 additions & 1887 deletions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ npm install pokeapi-js-wrapper --save
3232
```
3333

3434
```html
35-
<script src="https://unpkg.com/pokeapi-js-wrapper/dist/index.js"></script>
35+
<script src="https://unpkg.com/pokeapi-js-wrapper/src/index.js"></script>
3636
```
3737

3838
## Usage
3939

4040
```js
4141
const Pokedex = require("pokeapi-js-wrapper")
42-
const P = new Pokedex.Pokedex()
42+
const P = new Pokedex()
4343
```
4444

4545
```html
4646
<script>
47-
const P = new Pokedex.Pokedex()
47+
const P = new Pokedex()
4848
</script>
4949
```
5050

@@ -87,7 +87,7 @@ const customOptions = {
8787
timeout: 5 * 1000, // 5s
8888
cacheImages: true
8989
}
90-
const P = new Pokedex.Pokedex(customOptions)
90+
const P = new Pokedex(customOptions)
9191
```
9292

9393
### Caching images
@@ -101,7 +101,7 @@ Pokeapi.co serves its Pokemon images through [Github](https://github.com/PokeAPI
101101

102102
In this way when `pokeapi-js-wrapper`'s `Pokedex` is created it will install and start the Service Worker you are serving at the root of your server. The Service Worker will intercept all the calls your HTML/CSS/JS are making to get PokeAPI's images and will cache them.
103103

104-
It's fundamental that you download the Service Worker [we provide](https://raw.githubusercontent.com/PokeAPI/pokeapi-js-wrapper/master/dist/pokeapi-js-wrapper-sw.js)_(Right Click + Save As)_ and you serve it from the root of your project/server. Service Workers in fact cannot be installed from a domain different than yours.
104+
It's fundamental that you download the Service Worker [we provide](https://raw.githubusercontent.com/PokeAPI/pokeapi-js-wrapper/master/src/pokeapi-js-wrapper-sw.js)_(Right Click + Save As)_ and you serve it from the root of your project/server. Service Workers in fact cannot be installed from a domain different than yours.
105105

106106
A [basic example](https://github.com/PokeAPI/pokeapi-js-wrapper/blob/master/test/example-sw.html) is hosted [here](https://pokeapi.github.io/pokeapi-js-wrapper/test/example-sw.html).
107107

dist/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/index.js.LICENSE.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

dist/pokeapi-js-wrapper-sw.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)