@enact/cli 6.1.2 → 6.1.4

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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## 6.1.4 (April 24, 2025)
2
+
3
+ * No significant changes.
4
+
5
+ ## 6.1.3 (October 17, 2024)
6
+
7
+ * No significant changes.
8
+
1
9
  ## 6.1.2 (March 13, 2024)
2
10
 
3
11
  * Updated docs to cover the latest commands of `enact pack`.
package/README.md CHANGED
@@ -138,7 +138,7 @@ npm uninstall -g eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-bab
138
138
 
139
139
  Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
140
140
 
141
- Copyright (c) 2016-2024 LG Electronics
141
+ Copyright (c) 2016-2025 LG Electronics
142
142
 
143
143
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
144
144
 
package/commands/pack.js CHANGED
@@ -58,6 +58,8 @@ function displayHelp() {
58
58
  Private Options:
59
59
  --entry Specify an override entrypoint
60
60
  --no-minify Will skip minification during production build
61
+ --no-split-css Will not split CSS into separate files
62
+ --hash-classnames Will hash classnames in CSS
61
63
  --framework Builds the @enact/*, react, and react-dom into an external framework
62
64
  --externals Specify a local directory path to the standalone external framework
63
65
  --externals-public Remote public path to the external framework for use injecting into HTML
@@ -258,6 +260,8 @@ function api(opts = {}) {
258
260
  opts['content-hash'],
259
261
  opts.isomorphic,
260
262
  !opts.animation,
263
+ !opts['split-css'],
264
+ opts['hash-classnames'],
261
265
  opts.framework,
262
266
  opts['ilib-additional-path']
263
267
  );
@@ -289,6 +293,7 @@ function cli(args) {
289
293
  'content-hash',
290
294
  'custom-skin',
291
295
  'minify',
296
+ 'split-css',
292
297
  'framework',
293
298
  'externals-corejs',
294
299
  'stats',
@@ -296,12 +301,13 @@ function cli(args) {
296
301
  'isomorphic',
297
302
  'snapshot',
298
303
  'animation',
304
+ 'hash-classnames',
299
305
  'verbose',
300
306
  'watch',
301
307
  'help'
302
308
  ],
303
309
  string: ['externals', 'externals-public', 'locales', 'entry', 'ilib-additional-path', 'output', 'meta'],
304
- default: {minify: true, animation: true},
310
+ default: {minify: true, 'split-css': true, animation: true},
305
311
  alias: {
306
312
  o: 'output',
307
313
  p: 'production',
@@ -45,6 +45,8 @@ module.exports = function (
45
45
  contentHash = false,
46
46
  isomorphic = false,
47
47
  noAnimation = false,
48
+ noSplitCSS = false,
49
+ hashClassnames = false,
48
50
  framework = false,
49
51
  ilibAdditionalResourcesPath
50
52
  ) {
@@ -323,7 +325,7 @@ module.exports = function (
323
325
  use: getStyleLoaders({
324
326
  importLoaders: 1,
325
327
  modules: {
326
- getLocalIdent
328
+ ...(hashClassnames ? {} : {getLocalIdent})
327
329
  }
328
330
  })
329
331
  },
@@ -334,7 +336,8 @@ module.exports = function (
334
336
  use: getStyleLoaders({
335
337
  importLoaders: 1,
336
338
  modules: {
337
- ...(app.forceCSSModules ? {getLocalIdent} : {mode: 'icss'})
339
+ ...(app.forceCSSModules ? {} : {mode: 'icss'}),
340
+ ...(!app.forceCSSModules && hashClassnames ? {} : {getLocalIdent})
338
341
  }
339
342
  }),
340
343
  // Don't consider CSS imports dead code even if the
@@ -348,7 +351,7 @@ module.exports = function (
348
351
  use: getLessStyleLoaders({
349
352
  importLoaders: 2,
350
353
  modules: {
351
- getLocalIdent
354
+ ...(hashClassnames ? {} : {getLocalIdent})
352
355
  }
353
356
  })
354
357
  },
@@ -357,7 +360,8 @@ module.exports = function (
357
360
  use: getLessStyleLoaders({
358
361
  importLoaders: 2,
359
362
  modules: {
360
- ...(app.forceCSSModules ? {getLocalIdent} : {mode: 'icss'})
363
+ ...(app.forceCSSModules ? {} : {mode: 'icss'}),
364
+ ...(!app.forceCSSModules && hashClassnames ? {} : {getLocalIdent})
361
365
  }
362
366
  }),
363
367
  sideEffects: true
@@ -369,7 +373,7 @@ module.exports = function (
369
373
  use: getScssStyleLoaders({
370
374
  importLoaders: 3,
371
375
  modules: {
372
- getLocalIdent
376
+ ...(hashClassnames ? {} : {getLocalIdent})
373
377
  }
374
378
  })
375
379
  },
@@ -379,7 +383,8 @@ module.exports = function (
379
383
  use: getScssStyleLoaders({
380
384
  importLoaders: 3,
381
385
  modules: {
382
- ...(app.forceCSSModules ? {getLocalIdent} : {mode: 'icss'})
386
+ ...(app.forceCSSModules ? {} : {mode: 'icss'}),
387
+ ...(!app.forceCSSModules && hashClassnames ? {} : {getLocalIdent})
383
388
  }
384
389
  })
385
390
  },
@@ -451,7 +456,17 @@ module.exports = function (
451
456
  parallel: true
452
457
  }),
453
458
  new CssMinimizerPlugin()
454
- ]
459
+ ],
460
+ splitChunks: noSplitCSS && {
461
+ cacheGroups: {
462
+ styles: {
463
+ name: 'main',
464
+ type: 'css/mini-extract',
465
+ chunks: 'all',
466
+ enforce: true
467
+ }
468
+ }
469
+ }
455
470
  },
456
471
  plugins: [
457
472
  // Generates an `index.html` file with the js and css tags injected.
@@ -495,7 +510,8 @@ module.exports = function (
495
510
  !process.env.INLINE_STYLES &&
496
511
  new MiniCssExtractPlugin({
497
512
  filename: contentHash ? '[name].[contenthash].css' : '[name].css',
498
- chunkFilename: contentHash ? 'chunk.[name].[contenthash].css' : 'chunk.[name].css'
513
+ chunkFilename: contentHash ? 'chunk.[name].[contenthash].css' : 'chunk.[name].css',
514
+ ignoreOrder: noSplitCSS
499
515
  }),
500
516
  // Webpack5 removed node polyfills but we need this to run screenshot tests
501
517
  new NodePolyfillPlugin(),
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@enact/cli",
3
- "version": "6.1.2",
3
+ "version": "6.1.4",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@enact/cli",
9
- "version": "6.1.2",
9
+ "version": "6.1.4",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@babel/plugin-transform-modules-commonjs": "^7.23.3",
13
- "@enact/dev-utils": "^6.1.0",
13
+ "@enact/dev-utils": "^6.1.1",
14
14
  "@enact/template-sandstone": "^2.8.0",
15
15
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
16
16
  "@testing-library/jest-dom": "^6.2.0",
@@ -1580,9 +1580,9 @@
1580
1580
  }
1581
1581
  },
1582
1582
  "node_modules/@enact/dev-utils": {
1583
- "version": "6.1.0",
1584
- "resolved": "https://registry.npmjs.org/@enact/dev-utils/-/dev-utils-6.1.0.tgz",
1585
- "integrity": "sha512-uA5qZpPTgNAkt+2bIN8ncGe/k4XkLMI1CAlW11NecUrRI1nXwefBPp0QPv4VZGyYAbZlrTFEShYrVFQIwTwa/A==",
1583
+ "version": "6.1.1",
1584
+ "resolved": "https://registry.npmjs.org/@enact/dev-utils/-/dev-utils-6.1.1.tgz",
1585
+ "integrity": "sha512-ShwbCyXo9keYmquCmtXXZrSh537odNRshXaEZsdToK3UzzcHavZV/KYGd80Q4P/ekxjYWysuSappRygBSS2O3w==",
1586
1586
  "hasShrinkwrap": true,
1587
1587
  "dependencies": {
1588
1588
  "browserslist": "^4.22.2",
@@ -51204,9 +51204,9 @@
51204
51204
  "requires": {}
51205
51205
  },
51206
51206
  "@enact/dev-utils": {
51207
- "version": "6.1.0",
51208
- "resolved": "https://registry.npmjs.org/@enact/dev-utils/-/dev-utils-6.1.0.tgz",
51209
- "integrity": "sha512-uA5qZpPTgNAkt+2bIN8ncGe/k4XkLMI1CAlW11NecUrRI1nXwefBPp0QPv4VZGyYAbZlrTFEShYrVFQIwTwa/A==",
51207
+ "version": "6.1.1",
51208
+ "resolved": "https://registry.npmjs.org/@enact/dev-utils/-/dev-utils-6.1.1.tgz",
51209
+ "integrity": "sha512-ShwbCyXo9keYmquCmtXXZrSh537odNRshXaEZsdToK3UzzcHavZV/KYGd80Q4P/ekxjYWysuSappRygBSS2O3w==",
51210
51210
  "requires": {
51211
51211
  "browserslist": "^4.22.2",
51212
51212
  "chalk": "^5.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/cli",
3
- "version": "6.1.2",
3
+ "version": "6.1.4",
4
4
  "description": "Full-featured build environment tool for Enact applications.",
5
5
  "main": "index.js",
6
6
  "author": "Jason Robitaille <jason.robitaille@lge.com>",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@babel/plugin-transform-modules-commonjs": "^7.23.3",
47
- "@enact/dev-utils": "^6.1.0",
47
+ "@enact/dev-utils": "^6.1.1",
48
48
  "@enact/template-sandstone": "^2.8.0",
49
49
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
50
50
  "@testing-library/jest-dom": "^6.2.0",