mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Expose custom elements bundle in the root
This commit is contained in:
@@ -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/",
|
||||
|
||||
Reference in New Issue
Block a user