fix: use @^ for versions (#72)

* fix: use @^ for versions

fixes #71

* fix: fixup
This commit is contained in:
Nolan Lawson 2020-11-03 14:06:51 -08:00 committed by GitHub
parent f6b3d834b8
commit 82618562f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -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:
@ -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) |
@ -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*
@ -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.

View File

@ -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'

View File

@ -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 = {}) {

View File

@ -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 = '🖐️',