h1v3 0.7.6 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist/browser/client/system.js +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,6 +101,38 @@ This allows you to, in the browser, do:
|
|
|
101
101
|
const meta = import("/store_meta") with { type: "json" }
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
## Vendor the client-side libraries
|
|
105
|
+
|
|
106
|
+
You can install (free) dependencies and client files for the library using npx
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx h1v3 vendor-deps
|
|
110
|
+
npx h1v3 vendor-client
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
This will create folders such as:
|
|
114
|
+
- `/public/vendor/h1v3@0.7.6` (see below for suggestion on isolating your code from the library version)
|
|
115
|
+
- `/public/vendor/lit@3.3.1` (see https://lit.dev/)
|
|
116
|
+
|
|
117
|
+
You will also need to provide a vendored library of WebAwesome Pro:
|
|
118
|
+
|
|
119
|
+
- `/public/vendor/webawesome-pro` - for now this is an explicit dependency although you can symlink it to your current version of webawesome-pro. The system expects the `dist` folder to be available at `/public/vendor/webawesome-pro/dist`.
|
|
120
|
+
|
|
121
|
+
# Usage patterns
|
|
122
|
+
|
|
123
|
+
## Importing the library
|
|
124
|
+
|
|
125
|
+
When using the library in your website, you may wish to create a single import location which isolates your code from the version of h1v3 you are using. You can also use it to explicitly declare which bits of the library you are depending upon.
|
|
126
|
+
|
|
127
|
+
e.g. /public/js/h1v3.js
|
|
128
|
+
```javascript
|
|
129
|
+
export { default as bus } from "/vendor/h1v3@0.7.6/client/bus.js";
|
|
130
|
+
export { EVENT_USER_PROFILE_CHANGED } from "/vendor/h1v3@0.7.6/client/events.js";
|
|
131
|
+
export { styled } from "/vendor/h1v3@0.7.6/client/components/partials/wa-utils.js";
|
|
132
|
+
export * from "/vendor/h1v3@0.7.6/client/system.js";
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
|
|
104
136
|
# Implicit Google API dependencies
|
|
105
137
|
|
|
106
138
|
Note - this is an incomplete list...
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export const waDist = "/vendor
|
|
1
|
+
export const waDist = "/vendor/webawesome-pro";
|
|
2
2
|
|
|
3
3
|
// firebase
|
|
4
4
|
export * from "./firebase.js";
|
|
5
5
|
|
|
6
6
|
// vendor: webawesome
|
|
7
|
-
import "/vendor
|
|
8
|
-
import "/vendor
|
|
9
|
-
import "/vendor
|
|
10
|
-
import "/vendor
|
|
11
|
-
import "/vendor
|
|
12
|
-
import "/vendor
|
|
13
|
-
import "/vendor
|
|
7
|
+
import "/vendor/webawesome-pro/components/button/button.js";
|
|
8
|
+
import "/vendor/webawesome-pro/components/input/input.js";
|
|
9
|
+
import "/vendor/webawesome-pro/components/card/card.js";
|
|
10
|
+
import "/vendor/webawesome-pro/components/divider/divider.js";
|
|
11
|
+
import "/vendor/webawesome-pro/components/icon/icon.js";
|
|
12
|
+
import "/vendor/webawesome-pro/components/dialog/dialog.js";
|
|
13
|
+
import "/vendor/webawesome-pro/components/callout/callout.js";
|
|
14
14
|
|
|
15
15
|
// vendor: lit
|
|
16
16
|
export { html, LitElement, css, render } from "/vendor/lit@3.3.1/dist/lit-core.min.js";
|