@enact/cli 5.0.1 → 5.1.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.
- package/.travis.yml +1 -1
- package/CHANGELOG.md +16 -0
- package/commands/pack.js +2 -1
- package/commands/serve.js +19 -10
- package/docs/building-apps.md +22 -0
- package/npm-shrinkwrap.json +2255 -2043
- package/package.json +26 -22
package/.travis.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 5.1.0 (November 4, 2022)
|
|
2
|
+
|
|
3
|
+
* Unpinned versions of dependencies.
|
|
4
|
+
|
|
5
|
+
### pack
|
|
6
|
+
|
|
7
|
+
* Added `--custom-skin` option to build with custom skin for sandstone apps.
|
|
8
|
+
|
|
9
|
+
## 5.0.2 (September 16, 2022)
|
|
10
|
+
|
|
11
|
+
* Pinned versions of dependencies as same as 5.0.0.
|
|
12
|
+
|
|
13
|
+
### serve
|
|
14
|
+
|
|
15
|
+
* Fixed deprecation warning regarding middleware.
|
|
16
|
+
|
|
1
17
|
## 5.0.1 (August 30, 2022)
|
|
2
18
|
|
|
3
19
|
### pack
|
package/commands/pack.js
CHANGED
|
@@ -46,6 +46,7 @@ function displayHelp() {
|
|
|
46
46
|
console.log(' -s, --snapshot Generate V8 snapshot blob');
|
|
47
47
|
console.log(' (requires V8_MKSNAPSHOT set)');
|
|
48
48
|
console.log(' -m, --meta JSON to override package.json enact metadata');
|
|
49
|
+
console.log(' -c, --custom-skin Build with a custom skin');
|
|
49
50
|
console.log(' --stats Output bundle analysis file');
|
|
50
51
|
console.log(' --verbose Verbose log build details');
|
|
51
52
|
console.log(' -v, --version Display version information');
|
|
@@ -59,7 +60,6 @@ function displayHelp() {
|
|
|
59
60
|
--externals Specify a local directory path to the standalone external framework
|
|
60
61
|
--externals-public Remote public path to the external framework for use injecting into HTML
|
|
61
62
|
--externals-polyfill Flag whether to use external polyfill (or include in framework build)
|
|
62
|
-
--custom-skin To use a custom skin for build
|
|
63
63
|
--ilib-additional-path Specify iLib additional resources path
|
|
64
64
|
*/
|
|
65
65
|
process.exit(0);
|
|
@@ -301,6 +301,7 @@ function cli(args) {
|
|
|
301
301
|
l: 'locales',
|
|
302
302
|
s: 'snapshot',
|
|
303
303
|
m: 'meta',
|
|
304
|
+
c: 'custom-skin',
|
|
304
305
|
w: 'watch',
|
|
305
306
|
h: 'help'
|
|
306
307
|
}
|
package/commands/serve.js
CHANGED
|
@@ -211,22 +211,31 @@ function devServerConfig(host, port, protocol, publicPath, proxy, allowedHost) {
|
|
|
211
211
|
},
|
|
212
212
|
// `proxy` is run between `before` and `after` `webpack-dev-server` hooks
|
|
213
213
|
proxy,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
devServer.app.use(evalSourceMapMiddleware(devServer));
|
|
214
|
+
setupMiddlewares(middlewares, devServer) {
|
|
215
|
+
if (!devServer) {
|
|
216
|
+
throw new Error('webpack-dev-server is not defined');
|
|
217
|
+
}
|
|
219
218
|
|
|
220
219
|
// Optionally register app-side proxy middleware if it exists
|
|
221
220
|
const proxySetup = path.join(process.cwd(), 'src', 'setupProxy.js');
|
|
222
221
|
if (fs.existsSync(proxySetup)) {
|
|
223
222
|
require(proxySetup)(devServer.app);
|
|
224
223
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
224
|
+
|
|
225
|
+
middlewares.unshift(
|
|
226
|
+
// Keep `evalSourceMapMiddleware`
|
|
227
|
+
// middlewares before `redirectServedPath` otherwise will not have any effect
|
|
228
|
+
// This lets us fetch source contents from webpack for the error overlay
|
|
229
|
+
evalSourceMapMiddleware(devServer)
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
middlewares.push(
|
|
233
|
+
// Redirect to `PUBLIC_URL` or `homepage`/`enact.publicUrl` from `package.json`
|
|
234
|
+
// if url not match
|
|
235
|
+
redirectServedPathMiddleware(publicPath)
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
return middlewares;
|
|
230
239
|
}
|
|
231
240
|
};
|
|
232
241
|
}
|
package/docs/building-apps.md
CHANGED
|
@@ -22,6 +22,7 @@ order: 4
|
|
|
22
22
|
"all" - All locales that iLib supports
|
|
23
23
|
-s, --snapshot Generate V8 snapshot blob
|
|
24
24
|
(requires V8_MKSNAPSHOT set)
|
|
25
|
+
-c, --custom-skin Build with a custom skin
|
|
25
26
|
--stats Output bundle analysis file
|
|
26
27
|
|
|
27
28
|
```
|
|
@@ -196,6 +197,27 @@ try to set `NODE_PATH` to point global node_modules directory like below.
|
|
|
196
197
|
export NODE_PATH=/path/to/your/global/node_modules
|
|
197
198
|
```
|
|
198
199
|
|
|
200
|
+
## Custom Skin Support
|
|
201
|
+
|
|
202
|
+
Sandstone supports custom skin features to let you easily override the colors of components. All you need to do is build your app with `--custom-skin` option and add a CSS file named `custom_skin.css` which includes a preset of colors, under the `customizations` folder in the build result like below.
|
|
203
|
+
|
|
204
|
+
```none
|
|
205
|
+
my-app/
|
|
206
|
+
README.md
|
|
207
|
+
.gitignore
|
|
208
|
+
package.json
|
|
209
|
+
dist/
|
|
210
|
+
customizations/
|
|
211
|
+
custom_skin.css
|
|
212
|
+
main.css
|
|
213
|
+
main.js
|
|
214
|
+
...
|
|
215
|
+
node_modules/
|
|
216
|
+
src/
|
|
217
|
+
resources/
|
|
218
|
+
webos-meta/
|
|
219
|
+
```
|
|
220
|
+
|
|
199
221
|
## Isomorphic Support & Prerendering
|
|
200
222
|
By using the isomorphic code layout option, your project bundle will be outputted in a versatile universal code format allowing potential usage outside the browser. The Enact CLI takes advantage of this mode by additionally generating an HTML output of your project and embedding it directly with the resulting **index.html**. By default, isomorphic mode will attempt to prerender only `en-US`, however with the `--locales` option, a wide variety of locales can be specified and prerendered. More details on isomorphic support and its limitations can be found [here](./isomorphic-support.md).
|
|
201
223
|
|