@enact/cli 6.1.1 → 6.1.2
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/CHANGELOG.md +4 -0
- package/commands/pack.js +1 -1
- package/docs/building-apps.md +31 -4
- package/docs/serving-apps.md +1 -1
- package/docs/starting-a-new-app.md +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/commands/pack.js
CHANGED
|
@@ -38,7 +38,7 @@ function displayHelp() {
|
|
|
38
38
|
console.log(' -i, --isomorphic Use isomorphic code layout');
|
|
39
39
|
console.log(' (includes prerendering)');
|
|
40
40
|
console.log(' -l, --locales Locales for isomorphic mode; one of:');
|
|
41
|
-
console.log(' <
|
|
41
|
+
console.log(' <comma-separated-values> Locale list');
|
|
42
42
|
console.log(' <JSON-filepath> - Read locales from JSON file');
|
|
43
43
|
console.log(' "none" - Disable locale-specific handling');
|
|
44
44
|
console.log(' "used" - Detect locales used within ./resources/');
|
package/docs/building-apps.md
CHANGED
|
@@ -8,14 +8,15 @@ order: 4
|
|
|
8
8
|
enact pack [options]
|
|
9
9
|
|
|
10
10
|
Options
|
|
11
|
+
-o, --output Specify an output directory
|
|
11
12
|
--content-hash Add a unique hash to output file names based on the content of an asset
|
|
13
|
+
-w, --watch Rebuild on file changes
|
|
12
14
|
-p, --production Build in production mode
|
|
13
15
|
-i, --isomorphic Use isomorphic code layout
|
|
14
16
|
(includes prerendering)
|
|
15
|
-
-w, --watch Rebuild on file changes
|
|
16
17
|
-l, --locales Locales for isomorphic mode; one of:
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
[comma-separated-values] Locale list
|
|
19
|
+
[JSON-filepath] - Read locales from JSON file
|
|
19
20
|
"none" - Disable locale-specific handling
|
|
20
21
|
"used" - Detect locales used within ./resources/
|
|
21
22
|
"tv" - Locales supported on webOS TV
|
|
@@ -23,14 +24,18 @@ order: 4
|
|
|
23
24
|
"all" - All locales that iLib supports
|
|
24
25
|
-s, --snapshot Generate V8 snapshot blob
|
|
25
26
|
(requires V8_MKSNAPSHOT set)
|
|
27
|
+
-m, --meta JSON to override package.json enact metadata
|
|
26
28
|
-c, --custom-skin Build with a custom skin
|
|
27
29
|
--stats Output bundle analysis file
|
|
30
|
+
--verbose Verbose log build details
|
|
31
|
+
-v, --version Display version information
|
|
32
|
+
-h, --help Display help information
|
|
28
33
|
|
|
29
34
|
```
|
|
30
35
|
Run within an Enact project's source code, the `enact pack` command (aliased as `npm run pack` or `npm run pack-p` for production) will process and bundle the js, css, and asset files into the `./dist` directory. An **index.html** file will be dynamically generated.
|
|
31
36
|
|
|
32
37
|
## Production Mode
|
|
33
|
-
By default, projects will build in development mode. When
|
|
38
|
+
By default, projects will build in development mode. When your code is ready for deployment you can build in production mode. Production mode will minify the source code and remove dead code, along with numerous other minor code optimization strategies.
|
|
34
39
|
|
|
35
40
|
## Browser Support & Polyfills
|
|
36
41
|
The Enact CLI is designed to be compatible with a wide array of browsers and devices. [Browserslist standard](https://github.com/browserslist/browserslist) is used to handle targeting, with Enact's defaults being:
|
|
@@ -249,3 +254,25 @@ Similar to the [`enact serve`](./serving-apps.md) command, the watcher will buil
|
|
|
249
254
|
|
|
250
255
|
## Stats Analysis
|
|
251
256
|
The Bundle analysis file option uses the popular [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) to create a visual representation of the project build to **stats.html**, showing the full module hierarchy arranged by output size. This can be very useful in determining where bloat is coming from or finding dependencies that may have been included by mistake.
|
|
257
|
+
|
|
258
|
+
## Override Metadata
|
|
259
|
+
The @enact/cli tool inspects the `enact` object in the project's package.json for [customization options](./starting-a-new-app.md#enact-project-settings).
|
|
260
|
+
You can use the `--meta` flag to input a JSON string that overrides the `enact` metadata in package.json.
|
|
261
|
+
|
|
262
|
+
Here's an example of how to use the `--meta` flag:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
enact pack --meta='{"title":"myapp"}'
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
This command has the same effect as adding the following to your package.json:
|
|
269
|
+
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
...
|
|
273
|
+
"enact": {
|
|
274
|
+
"title": "myapp"
|
|
275
|
+
}
|
|
276
|
+
...
|
|
277
|
+
}
|
|
278
|
+
```
|
package/docs/serving-apps.md
CHANGED
|
@@ -38,7 +38,7 @@ The @enact/cli tool will check the project's **package.json** looking for an opt
|
|
|
38
38
|
* `proxy` _[string]_ - Proxy target during project `serve` to be used within the [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware).
|
|
39
39
|
|
|
40
40
|
For example:
|
|
41
|
-
```
|
|
41
|
+
```json
|
|
42
42
|
{
|
|
43
43
|
...
|
|
44
44
|
"enact": {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/cli",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@enact/cli",
|
|
9
|
-
"version": "6.1.
|
|
9
|
+
"version": "6.1.2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
|