Expose custom elements bundle in the root

pull/186/head
Cory LaViska 2020-08-17 16:36:05 -04:00
rodzic 389b9248db
commit a70d395502
2 zmienionych plików z 6 dodań i 6 usunięć
docs/getting-started

Wyświetl plik

@ -83,7 +83,7 @@ Next, import the components you want to use and set the assets directory.
```js
import '@shoelace-style/shoelace/dist/shoelace/shoelace.css';
import { setAssetPath, SlButton, SlDropdown } from '@shoelace-style/shoelace/dist/custom-elements';
import { setAssetPath, SlButton, SlDropdown } from '@shoelace-style/shoelace';
setAssetPath(document.currentScript.src);
customElements.define('sl-button', SlButton);
@ -94,7 +94,7 @@ For convenience, the bundle also exports a `defineCustomElements()` method. When
```js
import '@shoelace-style/shoelace/dist/shoelace/shoelace.css';
import { defineCustomElements, setAssetPath } from '@shoelace-style/shoelace/dist/custom-elements';
import { defineCustomElements, setAssetPath } from '@shoelace-style/shoelace';
setAssetPath(document.currentScript.src);
defineCustomElements();
@ -146,7 +146,7 @@ Next, import the components you want to use and set the assets directory.
```js
import '@shoelace-style/shoelace/dist/shoelace/shoelace.css';
import { setAssetPath, SlButton, SlDropdown } from '@shoelace-style/shoelace/dist/custom-elements';
import { setAssetPath, SlButton, SlDropdown } from '@shoelace-style/shoelace';
setAssetPath(document.currentScript.src);
customElements.define('sl-button', SlButton);
@ -157,7 +157,7 @@ For convenience, the bundle also exports a `defineCustomElements()` method. When
```js
import '@shoelace-style/shoelace/dist/shoelace/shoelace.css';
import { defineCustomElements, setAssetPath } from '@shoelace-style/shoelace/dist/custom-elements';
import { defineCustomElements, setAssetPath } from '@shoelace-style/shoelace';
setAssetPath(document.currentScript.src);
defineCustomElements();

Wyświetl plik

@ -3,11 +3,11 @@
"version": "2.0.0-beta.13",
"description": "A forward-thinking library of web components.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"es2015": "dist/esm/index.mjs",
"es2017": "dist/esm/index.mjs",
"types": "dist/types/index.d.ts",
"collection": "dist/collection/collection-manifest.json",
"module": "dist/custom-elements/index.js",
"types": "dist/custom-elements/index.d.ts",
"collection:main": "dist/collection/index.js",
"files": [
"dist/",