@yhwh-script/shadow-h4x 1.0.6 → 1.0.8
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 +14 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,10 +22,20 @@ Please stick to the following conventions! When working with Vite (recommended),
|
|
|
22
22
|
"generate": "node node_modules/@yhwh-script/shadow-h4x/generate.cjs"
|
|
23
23
|
}
|
|
24
24
|
```
|
|
25
|
+
Then run
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npm run dev
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This will autogenerate a map of your WebComponents inside the `src/components` folder.
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
Finally import shadow-h4x:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
<script type="module">
|
|
37
|
+
import('@yhwh-script/shadow-h4x')
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
29
40
|
|
|
30
|
-
Each WebComponent must be located in a subfolder under `public/components`, for instance:
|
|
31
|
-
`router/router-app.html`.
|
|
41
|
+
After importing shadow-h4x your WebComponents will be defined in the CustemElements registry. This is a feature! You don't have to register your elements manually. Just put them into the public folder. **Important!** Each WebComponent must be located in a subfolder under `public/components`, for instance: `public/components/router/router-app.html`.
|
package/package.json
CHANGED