Expose custom elements bundle in the root

This commit is contained in:
Cory LaViska
2020-08-17 16:36:05 -04:00
parent 389b9248db
commit a70d395502
2 changed files with 6 additions and 6 deletions

View File

@@ -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();

View File

@@ -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/",