piral-cycle 1.9.0-beta.8182 → 1.9.0-beta.8196

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.
Files changed (2) hide show
  1. package/README.md +8 -19
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -22,18 +22,19 @@ The extension slot component to be used in Cycle.js components.
22
22
 
23
23
  ## Usage
24
24
 
25
- ::: summary: For pilet authors
25
+ ::: summary: Modern Use (recommended)
26
26
 
27
- You can use the `fromCycle` function from the Pilet API to convert your Cycle.js components to components usable by your Piral instance.
27
+ The recommended way is to use `piral-cycle` 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 { fromCycle } from 'piral-cycle/convert';
33
34
  import { CyclePage } from './CyclePage';
34
35
 
35
36
  export function setup(piral: PiletApi) {
36
- piral.registerPage('/sample', piral.fromCycle(CyclePage));
37
+ piral.registerPage('/sample', fromCycle(CyclePage));
37
38
  }
38
39
  ```
39
40
 
@@ -57,22 +58,11 @@ Within Cycle.js components the Piral Cycle.js extension component can be used by
57
58
  ```jsx
58
59
  CycleExtension({ name: "name-of-extension" })
59
60
  ```
60
-
61
- Alternatively, if `piral-cycle` has not been added to the Piral instance you can install and use the package also from a pilet directly.
62
-
63
- ```ts
64
- import { PiletApi } from '<name-of-piral-instance>';
65
- import { fromCycle } from 'piral-cycle/convert';
66
- import { CyclePage } from './CyclePage';
67
-
68
- export function setup(piral: PiletApi) {
69
- piral.registerPage('/sample', fromCycle(CyclePage));
70
- }
71
- ```
72
-
73
61
  :::
74
62
 
75
- ::: summary: For Piral instance developers
63
+ ::: summary: Legacy Use
64
+
65
+ For backwards compatibility, you can also install `piral-cycle` in your Piral instance.
76
66
 
77
67
  Using Cycle.js with Piral is as simple as installing `piral-cycle` and Cycle.js:
78
68
 
@@ -107,9 +97,8 @@ The `@cycle/run`, `@cycle/dom` and `xstream` packages should be shared with the
107
97
  }
108
98
  }
109
99
  ```
110
-
111
100
  :::
112
101
 
113
102
  ## License
114
103
 
115
- Piral is released using the MIT license. For more information see the [license file](./LICENSE).
104
+ 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-cycle",
3
- "version": "1.9.0-beta.8182",
3
+ "version": "1.9.0-beta.8196",
4
4
  "description": "Plugin for integrating Cycle.js components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -53,8 +53,8 @@
53
53
  "devDependencies": {
54
54
  "@cycle/dom": "^22.7.0",
55
55
  "@cycle/run": "^5.4.0",
56
- "piral-core": "1.9.0-beta.8182",
56
+ "piral-core": "1.9.0-beta.8196",
57
57
  "xstream": "^11.12.0"
58
58
  },
59
- "gitHead": "495aa779b7e4482a1515f1e5a2a591f907c6a052"
59
+ "gitHead": "73f7d0d90884d0b1dc1cc5ed7965f0cb0bc48a20"
60
60
  }