@appshell/cli 0.3.0-alpha.5 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +10 -30
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  # @appshell/cli
13
13
 
14
- Appshell utilities for building micro-frontends with Appshell and Webpack Module federation.
14
+ Utility for building micro-frontends with Appshell and Webpack Module federation.
15
15
 
16
16
  Working examples can be found [here](https://github.com/navaris/appshell/tree/main/examples).
17
17
 
@@ -83,11 +83,11 @@ Options:
83
83
  appshell generate manifest --template dist/appshell.config.json
84
84
  ```
85
85
 
86
- **Where does the content of CONFIGS_DIR come from?**
86
+ **Where does the content of APPSHELL_REGISTRY come from?**
87
87
 
88
- > Each micro-frontend configured to use [@appshell/manifest-webpack-plugin](https://www.npmjs.com/package/@appshell/manifest-webpack-plugin) emits it's configuration to the configs directory at build time, which is subsequently processed with this utility to reflect the current runtime environment.
88
+ > Each micro-frontend configured to use [@appshell/manifest-webpack-plugin](https://www.npmjs.com/package/@appshell/manifest-webpack-plugin) emits a manifest template, which is subsequently used to generate a manifest for the remote module. This manifest is then registered with the APPSHELL_REGISTRY.
89
89
 
90
- Sample content from CONFIGS_DIR:
90
+ Sample manifest template `appshell.config.json`:
91
91
 
92
92
  ```json
93
93
  {
@@ -130,11 +130,11 @@ Sample content from CONFIGS_DIR:
130
130
 
131
131
  **How does my runtime environment get reflected in the appshell manifest?**
132
132
 
133
- > Note the variable expansion syntax `${CRA_MFE_URL}`. When `generate` is called the actual runtime environment values are injected and all configurations are ultimately merged into a global appshell manifest.
133
+ > Note the variable expansion syntax `${CRA_MFE_URL}`. When `appshell generate manifest` is called the actual runtime environment values are injected in order to produce the remote module's appshell manifest.
134
134
 
135
135
  > **Note** the `environment` section defines runtime environment variables that are injected into the global namesapce `window.__appshell_env__[module_name]` when a federated component is loaded. See the examples for a use case.
136
136
 
137
- Sample global appshell manifest produced by the `generate` function:
137
+ Sample appshell manifest produced by the `appshell generate manifest` function:
138
138
 
139
139
  ```json
140
140
  {
@@ -227,11 +227,11 @@ Sample global appshell manifest produced by the `generate` function:
227
227
  }
228
228
  ```
229
229
 
230
- This global appshell manifest can be consumed by your micro-frontend Appshell host and used to configure the Appshell accordingly.
230
+ This appshell manifest is registered with `APPSHELL_REGISTRY` and subsequently consumed by the Appshell host.
231
231
 
232
232
  ## Register a manifest
233
233
 
234
- Register on or more appshell manifests with the global registry.
234
+ Register one or more appshell manifests with the global registry.
235
235
 
236
236
  ```bash
237
237
  appshell register
@@ -246,26 +246,6 @@ Options:
246
246
  [string] [default: "appshell_registry"]
247
247
  ```
248
248
 
249
- ## Merge manifests
250
-
251
- Merge one or more appshell manifests to produce one global appshell manifest.
252
-
253
- ```bash
254
- appshell merge
255
-
256
- Merge one or more appshell manifests
257
-
258
- Options:
259
- --help Show help [boolean]
260
- --version Show version number [boolean]
261
- -o, --outDir Output location for the appshell manifest
262
- [string] [default: "."]
263
- -f, --outFile Output filename for the appshell manifest
264
- [string] [default: "appshell.manifest.json"]
265
- -m, --manifest One or more manifests to merge into a single appshell manifest
266
- [array]
267
- ```
268
-
269
249
  ## Generate runtime env
270
250
 
271
251
  Generates a runtime env js file that can be consumed by the application at runtime.
@@ -282,7 +262,7 @@ Options:
282
262
  -o, --outDir Output location for the runtime environment js [string] [default: "."]
283
263
  -f, --outFile Output filename for the runtime environment js [string] [default: "runtime.env.js"]
284
264
  -p, --prefix Only capture environment variables that start with prefix [string] [default: ""]
285
- -g, --globalName Global variable name window[globalName] used in the output js [string] [default: "appshell_env"]
265
+ -g, --globalName Global variable name window[globalName] used in the output js [string] [default: "__appshell_env__"]
286
266
  ```
287
267
 
288
268
  ### Sample usage
@@ -294,7 +274,7 @@ appshell generate env -e .env --prefix APPSHELL_ --outDir dist
294
274
  Sample output `runtime.env.js`
295
275
 
296
276
  ```js
297
- window.appshell_env = {
277
+ window.__appshell_env__ = {
298
278
  APPSHELL_VAR_1 = 'val 1',
299
279
  APPSHELL_VAR_2 = 'val 2'
300
280
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appshell/cli",
3
- "version": "0.3.0-alpha.5",
3
+ "version": "0.3.0",
4
4
  "description": "cli utility to generate a global appshell artifacts for module federation micro-frontends",
5
5
  "main": "dist/main.js",
6
6
  "repository": "https://github.com/navaris/appshell.git",
@@ -30,5 +30,5 @@
30
30
  "appshell"
31
31
  ],
32
32
  "license": "MIT",
33
- "gitHead": "05026fe4d960f8bae77b6a00935d62184b6f874d"
33
+ "gitHead": "a20c074472f1f55b0479b07e95d63aa0ccdd4be9"
34
34
  }