piral-litel 1.9.0-beta.8186 → 1.9.0-beta.8209
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 +8 -19
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -22,18 +22,19 @@ The name of the extension slot component to be used in LitElement components. Th
|
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
|
-
::: summary:
|
|
25
|
+
::: summary: Modern Use (recommended)
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
The recommended way is to use `piral-litel` from your pilets. In this case, no registration in the Piral instance is required.
|
|
28
28
|
|
|
29
29
|
Example use:
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
32
|
import { PiletApi } from '<name-of-piral-instance>';
|
|
33
|
+
import { fromLitel } from 'piral-litel/convert';
|
|
33
34
|
import './LitElPage';
|
|
34
35
|
|
|
35
36
|
export function setup(piral: PiletApi) {
|
|
36
|
-
piral.registerPage('/sample',
|
|
37
|
+
piral.registerPage('/sample', fromLitel('my-page'));
|
|
37
38
|
}
|
|
38
39
|
```
|
|
39
40
|
|
|
@@ -42,22 +43,11 @@ Within LitElement components the Piral LitElement extension component can be use
|
|
|
42
43
|
```html
|
|
43
44
|
<litel-extension name="name-of-extension"></litel-extension>
|
|
44
45
|
```
|
|
45
|
-
|
|
46
|
-
Alternatively, if `piral-litel` has not been added to the Piral instance you can install and use the package also from a pilet directly.
|
|
47
|
-
|
|
48
|
-
```ts
|
|
49
|
-
import { PiletApi } from '<name-of-piral-instance>';
|
|
50
|
-
import { fromLitel } from 'piral-litel/convert';
|
|
51
|
-
import './LitElPage';
|
|
52
|
-
|
|
53
|
-
export function setup(piral: PiletApi) {
|
|
54
|
-
piral.registerPage('/sample', fromLitel('my-page'));
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
46
|
:::
|
|
59
47
|
|
|
60
|
-
::: summary:
|
|
48
|
+
::: summary: Legacy Use
|
|
49
|
+
|
|
50
|
+
For backwards compatibility, you can also install `piral-litel` in your Piral instance.
|
|
61
51
|
|
|
62
52
|
Using LitElement with Piral is as simple as installing `piral-litel` and `lit-element@^2`.
|
|
63
53
|
|
|
@@ -87,7 +77,6 @@ The `lit-element` and `@webcomponents/webcomponentsjs` packages should be shared
|
|
|
87
77
|
}
|
|
88
78
|
}
|
|
89
79
|
```
|
|
90
|
-
|
|
91
80
|
:::
|
|
92
81
|
|
|
93
82
|
## Preparing Pilets
|
|
@@ -108,4 +97,4 @@ This will make sure that ES6 classes are used, which is required for web compone
|
|
|
108
97
|
|
|
109
98
|
## License
|
|
110
99
|
|
|
111
|
-
Piral is released using the MIT license. For more information see the [license file](./LICENSE).
|
|
100
|
+
Piral is released using the MIT license. For more information see the [license file](./LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-litel",
|
|
3
|
-
"version": "1.9.0-beta.
|
|
3
|
+
"version": "1.9.0-beta.8209",
|
|
4
4
|
"description": "Plugin for integrating Lit-Element components in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"lit-element": "^2.2.1",
|
|
56
|
-
"piral-core": "1.9.0-beta.
|
|
56
|
+
"piral-core": "1.9.0-beta.8209"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6ae23abba61e76479bc06b76454c38957bc0e79e"
|
|
59
59
|
}
|