kopia lustrzana https://github.com/shoelace-style/shoelace
Expose custom elements bundle in the root
rodzic
389b9248db
commit
a70d395502
docs/getting-started
|
@ -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();
|
||||
|
|
|
@ -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/",
|
||||
|
|
Ładowanie…
Reference in New Issue