From a67235a3fd79fc79ccf074f0ccdec5c9de4dc1c8 Mon Sep 17 00:00:00 2001 From: "taeyoung.hong" Date: Mon, 20 Jan 2025 20:07:05 +0900 Subject: [PATCH 1/2] WRR-14491: Update dev-utils to support Limestone --- CHANGELOG.md | 4 ++-- option-parser.js | 6 +++--- plugins/ILibPlugin/README.md | 2 +- plugins/PrerenderPlugin/README.md | 4 ++-- plugins/SnapshotPlugin/index.js | 2 +- plugins/SnapshotPlugin/snapshot-helper.js | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0139793..51744d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -116,8 +116,8 @@ # 4.1.0 (March 26, 2021) -* `option-parser`: Set default theme config to `sandstone`. -* `SnapshotPlugin`: Added `sandstone` support for clearing resource bundle. +* `option-parser`: Set default theme config to `limestone`. +* `SnapshotPlugin`: Added `limestone` support for clearing resource bundle. * `framework` mixin: Fixed the glob patterns for test files to ignore. # 4.0.0 (February 5, 2021) diff --git a/option-parser.js b/option-parser.js index 6430cff..66b5ae5 100644 --- a/option-parser.js +++ b/option-parser.js @@ -114,7 +114,7 @@ const config = { enact = Object.assign(enact, meta); // Parse the theme config tree for defaults - config.theme = themeConfig(pkg.path, process.env.ENACT_THEME || enact.theme || 'sandstone'); + config.theme = themeConfig(pkg.path, process.env.ENACT_THEME || enact.theme || 'limestone'); // Optional alternate entrypoint for isomorphic builds. config.isomorphic = computed('isomorphic', enact, config.theme); @@ -145,7 +145,7 @@ const config = { config.additionalModulePaths = computed('additionalModulePaths', enact, config.theme); config.entry = computed('entry', enact, config.theme); - // Resolve array of screenType configurations. When not found, falls back to any theme preset or sandstone. + // Resolve array of screenType configurations. When not found, falls back to any theme preset or limestone. const screens = computed('screenTypes', enact, config.theme); config.screenTypes = (Array.isArray(screens) && screens) || @@ -161,7 +161,7 @@ const config = { ? riConfig : config.screenTypes.reduce((r, s) => (s.base && {baseSize: s.pxPerRem}) || r, undefined); - // Resolved filepath to fontGenerator. When not found, falls back to any theme preset or sandstone. + // Resolved filepath to fontGenerator. When not found, falls back to any theme preset or limestone. const fontGenerator = computed('fontGenerator', enact, config.theme); config.fontGenerator = fontGenerator && diff --git a/plugins/ILibPlugin/README.md b/plugins/ILibPlugin/README.md index 7a30594..e7680fc 100644 --- a/plugins/ILibPlugin/README.md +++ b/plugins/ILibPlugin/README.md @@ -30,7 +30,7 @@ Allowed values are as follows: - `ilib`: Custom path to the iLib codebase. Alternatively, a `ILIB_BASE_PATH` environment variable can be set to specify a path. When passed an absoute path, the `emit` option will be set to `false`. Defaults to `node_modules/@enact/i18n/ilib`. - `resources`: Custom path to the app-level resource bundle. Defaults to `resources`. Can be set to `false` to disable detection/handling of app-level resources. -- `bundles`: Any additional resource bundles to copy to the output directory. Defaults to `[]`. Will automatically add the `@enact/sandstone` ResBundle if detected. +- `bundles`: Any additional resource bundles to copy to the output directory. Defaults to `[]`. Will automatically add the `@enact/limestone` ResBundle if detected. - `create`: Whether or not to dynamically generate any `ilibmanifest.json` files, if a bundle is missing it. Defaults to `true`. - `emit`: Whether or not to emit the stock iLib locale assets to the output directory. Defaults to `true`. - `cache`: Whether or not to cache locale/resource assets and copy emit them if they're newer/changed from source files. Defaults to `true`. diff --git a/plugins/PrerenderPlugin/README.md b/plugins/PrerenderPlugin/README.md index a006339..5c27a13 100644 --- a/plugins/PrerenderPlugin/README.md +++ b/plugins/PrerenderPlugin/README.md @@ -48,8 +48,8 @@ Allowed values are as follows: - `server`: Virtual DOM server module filepath to use when rendering static HTML. Defaults to `require.resolve('react-dom/server')`. - `externals`: Local filepath to a directory containing an external enact library bundle js and css files. Only needed if using external Enact framework bundle. - `deep`: A string or array of string conditions, that when met at runtime, should not display the prerendered HTML. -- `screenTypes`: Array of 1 or more screentype definitions to be used with prerender HTML initialization. See [here](https://github.com/enactjs/sandstone/blob/master/ThemeDecorator/screenTypes.json) for an example of the sandstone screenTypes. -- `fontGenerator`: Module path to a font stylesheet generator for prerendering fontface definitions. See [here](https://github.com/enactjs/sandstone/blob/master/ThemeDecorator/fontGenerator.js) for an example of the sandstone font generator. +- `screenTypes`: Array of 1 or more screentype definitions to be used with prerender HTML initialization. See [here](https://github.com/enactjs/limestone/blob/master/ThemeDecorator/screenTypes.json) for an example of the limestone screenTypes. +- `fontGenerator`: Module path to a font stylesheet generator for prerendering fontface definitions. See [here](https://github.com/enactjs/limestone/blob/master/ThemeDecorator/fontGenerator.js) for an example of the limestone font generator. - `externalStartup`: A flag whether to externalize the startup javascript normally inlined with prerendered HTML output. Here's an example webpack config illustrating how to use these options: diff --git a/plugins/SnapshotPlugin/index.js b/plugins/SnapshotPlugin/index.js index fbd1ee9..32880fa 100644 --- a/plugins/SnapshotPlugin/index.js +++ b/plugins/SnapshotPlugin/index.js @@ -79,7 +79,7 @@ class SnapshotPlugin { const filter = lib => (resource, context) => { return resource.startsWith(lib) && context === ignoreContext; }; - ['@enact/i18n', '@enact/moonstone', '@enact/sandstone', '@enact/core/snapshot'].filter(missing).forEach(p => { + ['@enact/i18n', '@enact/moonstone', '@enact/sandstone', '@enact/limestone', '@enact/core/snapshot'].filter(missing).forEach(p => { new IgnorePlugin({checkResource: filter(p)}).apply(compiler); }); // ilib can be aliased to @enact/i18n/ilib, so verify both are missing before ignoring diff --git a/plugins/SnapshotPlugin/snapshot-helper.js b/plugins/SnapshotPlugin/snapshot-helper.js index aa2ed87..279d9ad 100644 --- a/plugins/SnapshotPlugin/snapshot-helper.js +++ b/plugins/SnapshotPlugin/snapshot-helper.js @@ -11,7 +11,7 @@ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment'); function handleException(e) { // We allow 'Cannot find module' errors, which throw when the libraries are not used in the app. - // @enact/i18n, @enact/moonstone, and @enact/sandstone are considered optional dependencies. + // @enact/i18n, @enact/moonstone, and @enact/limestone are considered optional dependencies. if (!e.code || e.code !== 'MODULE_NOT_FOUND') { throw e; } @@ -47,8 +47,8 @@ global.updateEnvironment = function() { handleException(moonEx); } try { - var sandstoneBundle = require('@enact/sandstone/internal/$L'); - sandstoneBundle.clearResBundle(); + var limestoneBundle = require('@enact/limestone/internal/$L'); + limestoneBundle.clearResBundle(); } catch (sandEx) { handleException(sandEx); } From d4b926cd9b7de2e150c0207df722f5e5481f1dd8 Mon Sep 17 00:00:00 2001 From: "taeyoung.hong" Date: Mon, 20 Jan 2025 20:12:15 +0900 Subject: [PATCH 2/2] update CHANGELOG.md --- CHANGELOG.md | 9 +++++++-- plugins/SnapshotPlugin/snapshot-helper.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51744d7..7df5d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# unreleased + +* `option-parser`: Set default theme config to `limestone`. +* `SnapshotPlugin`: Added `limestone` support for clearing resource bundle. + # 7.0.0-alpha.3 (January 15, 2025) * Updated all dependencies to the latest including React 19. @@ -116,8 +121,8 @@ # 4.1.0 (March 26, 2021) -* `option-parser`: Set default theme config to `limestone`. -* `SnapshotPlugin`: Added `limestone` support for clearing resource bundle. +* `option-parser`: Set default theme config to `sandstone`. +* `SnapshotPlugin`: Added `sandstone` support for clearing resource bundle. * `framework` mixin: Fixed the glob patterns for test files to ignore. # 4.0.0 (February 5, 2021) diff --git a/plugins/SnapshotPlugin/snapshot-helper.js b/plugins/SnapshotPlugin/snapshot-helper.js index 279d9ad..c531d72 100644 --- a/plugins/SnapshotPlugin/snapshot-helper.js +++ b/plugins/SnapshotPlugin/snapshot-helper.js @@ -11,7 +11,7 @@ var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment'); function handleException(e) { // We allow 'Cannot find module' errors, which throw when the libraries are not used in the app. - // @enact/i18n, @enact/moonstone, and @enact/limestone are considered optional dependencies. + // @enact/i18n, @enact/moonstone, @enact/sandstone, and @enact/limestone are considered optional dependencies. if (!e.code || e.code !== 'MODULE_NOT_FOUND') { throw e; }