update docs (#1095)

* update docs

* add publish access config

* update package-lock
This commit is contained in:
Konnor Rogers
2025-06-30 15:32:08 -04:00
committed by GitHub
parent 88e99d7cd3
commit 7743b670ed
4 changed files with 21 additions and 17 deletions

9
package-lock.json generated
View File

@@ -589,6 +589,10 @@
"node": ">=12.17"
}
},
"node_modules/@awesome.me/webawesome": {
"resolved": "packages/webawesome",
"link": true
},
"node_modules/@babel/code-frame": {
"version": "7.23.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
@@ -13587,10 +13591,6 @@
"node": ">= 8"
}
},
"node_modules/webawesome": {
"resolved": "packages/webawesome",
"link": true
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
@@ -13974,6 +13974,7 @@
}
},
"packages/webawesome": {
"name": "@awesome.me/webawesome",
"version": "3.0.0-beta.1",
"license": "MIT",
"dependencies": {

View File

@@ -26,8 +26,8 @@ If you're using a bundler, make sure it comes _before_ any components are import
// Make sure this import is first.
import '@lit-labs/ssr-client/lit-element-hydrate-support.js';
import 'webawesome/dist/components/button/button.js';
import 'webawesome/dist/components/input/input.js';
import '@awesome.me/webawesome/dist/components/button/button.js';
import '@awesome.me/webawesome/dist/components/input/input.js';
```
## Enable Server Rendering
@@ -43,7 +43,7 @@ import litPlugin from '@lit-labs/eleventy-plugin-lit';
eleventyConfig.addPlugin(litPlugin, {
mode: 'worker',
componentModules: ['webawesome/dist/components/button/button.js', 'webawesome/dist/components/input/input.js'],
componentModules: ['@awesome.me/webawesome/dist/components/button/button.js', '@awesome.me/webawesome/dist/components/input/input.js'],
});
```
@@ -114,4 +114,4 @@ Here are some known issues and things we're still working on.
- `@shoelace-style/localize` (our localization library) has no way to set a language currently so it always falls back to `en`.
- `<wa-icon>` has no fallback if there's no JS besides a blank `<svg>`. There's perhaps some backend mechanisms we can use to fetch. But requires altering APIs. Should also have a way to set height / widths, but we don't want to increase pain for SSR users.
- `<wa-qr-code>` QR Code will not error on the backend and will render a blank canvas at the appropriate size, but will not render the canvas until the client component connects.
- `setBasePath` and `kit codes` may need reconfiguring to work with SSR.
- `setBasePath` and `kit codes` may need reconfiguring to work with SSR.

View File

@@ -83,7 +83,7 @@ You will see files named `chunk.[hash].js` in the `chunks` directory. Never impo
### Installing via npm
```bash
npm install webawesome
npm install @awesome.me/webawesome
```
And then in your JavaScript files, import the components you need.
@@ -94,15 +94,15 @@ Web Awesome does not a provide a single import with all Web Awesome components.
```js
// import the Web Awesome base stylesheet
import "webawesome/dist/styles/webawesome.css"
import "@awesome.me/webawesome/dist/styles/webawesome.css"
// import the default "theme"
import "webawesome/dist/styles/themes/default.css"
import "@awesome.me/webawesome/dist/styles/themes/default.css"
// <wa-button>
import "webawesome/dist/components/button/button.js"
import "@awesome.me/webawesome/dist/components/button/button.js"
// <wa-input>
import "webawesome/dist/components/input/input.js"
import "@awesome.me/webawesome/dist/components/input/input.js"
```
Once they've been imported, you can use them in your HTML normally. Component imports are located in the "Importing" section of each component's documentation.
@@ -130,7 +130,7 @@ Most of the magic behind assets is handled internally by Web Awesome, but if you
```html
<script type="module">
import { getBasePath, setBasePath } from '/path/to/web-awesome/dist/webawesome.js';
import { getBasePath, setBasePath } from '/path/to/webawesome/dist/webawesome.js';
setBasePath('/path/to/assets');
@@ -152,5 +152,5 @@ The `/dist-cdn` files are bundled differently than the `/dist` files. The `/dist
TLDR:
- `webawesome/dist-cdn` is for CDNs or people not using a bundler.
- `webawesome/dist` is for bundlers or importmaps.
- `@awesome.me/webawesome/dist-cdn` is for CDNs or people not using a bundler.
- `@awesome.me/webawesome/dist` is for bundlers or importmaps.

View File

@@ -1,5 +1,8 @@
{
"name": "webawesome",
"name": "@awesome.me/webawesome",
"publishConfig": {
"access": "public"
},
"description": "A forward-thinking library of web components.",
"version": "3.0.0-beta.1",
"homepage": "https://webawesome.com/",