Skip to content

Commit

Permalink
6.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
enact-bot committed Mar 13, 2024
2 parents efb4045 + 53156dd commit 5dff65c
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.1.2 (March 13, 2024)

* Updated docs to cover the latest commands of `enact pack`.

## 6.1.1 (March 5, 2024)

* Updated dependencies.
Expand Down
2 changes: 1 addition & 1 deletion commands/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function displayHelp() {
console.log(' -i, --isomorphic Use isomorphic code layout');
console.log(' (includes prerendering)');
console.log(' -l, --locales Locales for isomorphic mode; one of:');
console.log(' <commana-separated-values> Locale list');
console.log(' <comma-separated-values> Locale list');
console.log(' <JSON-filepath> - Read locales from JSON file');
console.log(' "none" - Disable locale-specific handling');
console.log(' "used" - Detect locales used within ./resources/');
Expand Down
35 changes: 31 additions & 4 deletions docs/building-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,34 @@ order: 4
enact pack [options]
Options
-o, --output Specify an output directory
--content-hash Add a unique hash to output file names based on the content of an asset
-w, --watch Rebuild on file changes
-p, --production Build in production mode
-i, --isomorphic Use isomorphic code layout
(includes prerendering)
-w, --watch Rebuild on file changes
-l, --locales Locales for isomorphic mode; one of:
<comma-separated-values> Locale list
<JSON-filepath> - Read locales from JSON file
[comma-separated-values] Locale list
[JSON-filepath] - Read locales from JSON file
"none" - Disable locale-specific handling
"used" - Detect locales used within ./resources/
"tv" - Locales supported on webOS TV
"signage" - Locales supported on webOS signage
"all" - All locales that iLib supports
-s, --snapshot Generate V8 snapshot blob
(requires V8_MKSNAPSHOT set)
-m, --meta JSON to override package.json enact metadata
-c, --custom-skin Build with a custom skin
--stats Output bundle analysis file
--verbose Verbose log build details
-v, --version Display version information
-h, --help Display help information
```
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.

## Production Mode
By default, projects will build in development mode. When you're 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.
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.

## Browser Support & Polyfills
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:
Expand Down Expand Up @@ -249,3 +254,25 @@ Similar to the [`enact serve`](./serving-apps.md) command, the watcher will buil

## Stats Analysis
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.

## Override Metadata
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).
You can use the `--meta` flag to input a JSON string that overrides the `enact` metadata in package.json.

Here's an example of how to use the `--meta` flag:

```bash
enact pack --meta='{"title":"myapp"}'
```

This command has the same effect as adding the following to your package.json:

```json
{
...
"enact": {
"title": "myapp"
}
...
}
```
2 changes: 1 addition & 1 deletion docs/serving-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Enact CLI uses [http-proxy-middleware](https://github.com/chimurai/http-proxy-mi
This feature can be configured in the project's **package.json** within the `enact` object's `proxy` property.

For example:
```js
```json
{
...
"enact": {
Expand Down
2 changes: 1 addition & 1 deletion docs/starting-a-new-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The @enact/cli tool will check the project's **package.json** looking for an opt
* `proxy` _[string]_ - Proxy target during project `serve` to be used within the [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware).

For example:
```js
```json
{
...
"enact": {
Expand Down
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enact/cli",
"version": "6.1.1",
"version": "6.1.2",
"description": "Full-featured build environment tool for Enact applications.",
"main": "index.js",
"author": "Jason Robitaille <[email protected]>",
Expand Down

0 comments on commit 5dff65c

Please sign in to comment.