Skip to content

Commit

Permalink
fix: use @^ for versions (#72)
Browse files Browse the repository at this point in the history
* fix: use @^ for versions

fixes #71

* fix: fixup
  • Loading branch information
nolanlawson committed Nov 3, 2020
1 parent f6b3d83 commit 8261856
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -85,7 +85,7 @@ import 'emoji-picker-element';
Or as a `<script>` tag:

```html
<script type="module" src="https://cdn.jsdelivr.net/npm/emoji-picker-element@1/index.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/emoji-picker-element@^1/index.js"></script>
```

Then use the HTML:
Expand Down Expand Up @@ -247,7 +247,7 @@ Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`customCategorySorting` | function | - | Function to sort custom category strings (sorted alphabetically by default) |
`customEmoji` | CustomEmoji[] | - | Array of custom emoji |
`dataSource` | string | "https://cdn.jsdelivr.net/npm/emojibase-data@5/en/data.json" | URL to fetch the emojibase data from (`data-source` when used as an attribute) |
`dataSource` | string | "https://cdn.jsdelivr.net/npm/emojibase-data@^5/en/data.json" | URL to fetch the emojibase data from (`data-source` when used as an attribute) |
`i18n` | I18n | - | i18n object (see below for details) |
`locale` | string | "en" | Locale string |
`skinToneEmoji` | string | "🖐️" | The emoji to use for the skin tone picker (`skin-tone-emoji` when used as an attribute) |
Expand Down Expand Up @@ -382,7 +382,7 @@ same underlying IndexedDB connection and database.
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`customEmoji` | CustomEmoji[] | [] | Array of custom emoji |
`dataSource` | string | "https://cdn.jsdelivr.net/npm/emojibase-data@5/en/data.json" | URL to fetch the emojibase data from |
`dataSource` | string | "https://cdn.jsdelivr.net/npm/emojibase-data@^5/en/data.json" | URL to fetch the emojibase data from |
`locale` | string | "en" | Locale string |

**Returns:** *Database*
Expand Down Expand Up @@ -740,7 +740,7 @@ import Picker from 'emoji-picker-element/svelte';

If you'd like to host the emoji JSON yourself, you can do:

npm install emojibase-data@5
npm install emojibase-data@^5

Then host `node_modules/emojibase-data/en/data.json` (or other locales) on your web server.

Expand Down
2 changes: 1 addition & 1 deletion src/database/constants.js
Expand Up @@ -18,5 +18,5 @@ export const MODE_READWRITE = 'readwrite'
export const INDEX_SKIN_UNICODE = 'skinUnicodes'
export const FIELD_SKIN_UNICODE = 'skinUnicodes'

export const DEFAULT_DATA_SOURCE = 'https://cdn.jsdelivr.net/npm/emojibase-data@5/en/data.json'
export const DEFAULT_DATA_SOURCE = 'https://cdn.jsdelivr.net/npm/emojibase-data@^5/en/data.json'
export const DEFAULT_LOCALE = 'en'
2 changes: 1 addition & 1 deletion src/types/database.ts
Expand Up @@ -13,7 +13,7 @@ export default class Database {
* @param customEmoji - Array of custom emoji
*/
constructor({
dataSource = 'https://cdn.jsdelivr.net/npm/emojibase-data@5/en/data.json',
dataSource = 'https://cdn.jsdelivr.net/npm/emojibase-data@^5/en/data.json',
locale = 'en',
customEmoji = []
}: DatabaseConstructorOptions = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/types/picker.ts
Expand Up @@ -18,7 +18,7 @@ export default class Picker extends HTMLElement {
* @param customCategorySorting - Function to sort custom category strings (sorted alphabetically by default)
*/
constructor({
dataSource = 'https://cdn.jsdelivr.net/npm/emojibase-data@5/en/data.json',
dataSource = 'https://cdn.jsdelivr.net/npm/emojibase-data@^5/en/data.json',
locale = 'en',
i18n,
skinToneEmoji = '🖐️',
Expand Down

0 comments on commit 8261856

Please sign in to comment.