piral-ngjs 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.
Files changed (2) hide show
  1. package/README.md +10 -22
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -22,19 +22,21 @@ The extension slot module to be referenced in Angular.js module definitions. All
22
22
 
23
23
  ## Usage
24
24
 
25
- ::: summary: For pilet authors
25
+ ::: summary: Modern Use (recommended)
26
26
 
27
- You can use the `fromNgjs` function from the Pilet API to convert your Angular.js modules to components usable by your Piral instance.
27
+ The recommended way is to use `piral-ngjs` 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 { fromNgjs, createNgjsExtension } from 'piral-ngjs/convert';
33
34
  import { createAngularJsPage } from './AngularJsPage';
34
35
 
35
36
  export function setup(piral: PiletApi) {
36
- const AngularJsPage = createAngularJsPage(piral.NgjsExtension.name);
37
- piral.registerPage('/sample', piral.fromNgjs(AngularJsPage));
37
+ const Extension = createNgjsExtension();
38
+ const AngularJsPage = createAngularJsPage(Extension.name);
39
+ piral.registerPage('/sample', fromNgjs(AngularJsPage));
38
40
  }
39
41
  ```
40
42
 
@@ -43,24 +45,11 @@ Within Angular.js components the Piral Angular.js extension component can be use
43
45
  ```html
44
46
  <extension-component name="name-of-extension"></extension-component>
45
47
  ```
46
-
47
- Alternatively, if `piral-ngjs` has not been added to the Piral instance you can install and use the package also from a pilet directly.
48
-
49
- ```ts
50
- import { PiletApi } from '<name-of-piral-instance>';
51
- import { fromNgjs, createNgjsExtension } from 'piral-ngjs/convert';
52
- import { createAngularJsPage } from './AngularJsPage';
53
-
54
- export function setup(piral: PiletApi) {
55
- const Extension = createNgjsExtension();
56
- const AngularJsPage = createAngularJsPage(Extension.name);
57
- piral.registerPage('/sample', fromNgjs(AngularJsPage));
58
- }
59
- ```
60
-
61
48
  :::
62
49
 
63
- ::: summary: For Piral instance developers
50
+ ::: summary: Legacy Use
51
+
52
+ For backwards compatibility, you can also install `piral-ngjs` in your Piral instance.
64
53
 
65
54
  The provided library only brings API extensions for pilets to a Piral instance. The Piral instance still needs to be configured properly to support Angular.js 1.x. For this you'll need to install the `angular@^1.7` package.
66
55
 
@@ -91,9 +80,8 @@ The `angular` package should be shared with the pilets via the *package.json*:
91
80
  }
92
81
  }
93
82
  ```
94
-
95
83
  :::
96
84
 
97
85
  ## License
98
86
 
99
- Piral is released using the MIT license. For more information see the [license file](./LICENSE).
87
+ 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-ngjs",
3
- "version": "1.9.0-beta.8186",
3
+ "version": "1.9.0-beta.8209",
4
4
  "description": "Plugin for integrating Angular.js components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -53,7 +53,7 @@
53
53
  "devDependencies": {
54
54
  "@types/angular": "^1.6.45",
55
55
  "angular": "^1.7.9",
56
- "piral-core": "1.9.0-beta.8186"
56
+ "piral-core": "1.9.0-beta.8209"
57
57
  },
58
- "gitHead": "ff7d73f1903c20eb9f14e58b21f33d36dee8f572"
58
+ "gitHead": "6ae23abba61e76479bc06b76454c38957bc0e79e"
59
59
  }