@zohodesk/client_build_tool 0.0.6-exp.5 → 0.0.6-exp.50

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.
Files changed (89) hide show
  1. package/README.md +0 -222
  2. package/README_backup.md +0 -222
  3. package/lib/schemas/defaultConfigValues.js +23 -2
  4. package/lib/schemas/readOptions.js +33 -0
  5. package/lib/shared/babel/babelWebConfig.js +4 -1
  6. package/lib/shared/babel/runBabelForTsFile.js +30 -0
  7. package/lib/shared/bundler/webpack/common/decidePublicPath.js +5 -0
  8. package/lib/shared/bundler/webpack/common/nameTemplates.js +13 -9
  9. package/lib/shared/bundler/webpack/custom_plugins/{CdnChangePlugin.js → CdnChangePlugin/index.js} +25 -5
  10. package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +46 -0
  11. package/lib/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +109 -0
  12. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +1 -1
  13. package/lib/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +4 -0
  14. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +8 -2
  15. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +7 -1
  16. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +1 -1
  17. package/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +1 -0
  18. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +5 -1
  19. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +13 -0
  20. package/lib/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +20 -2
  21. package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +1 -1
  22. package/lib/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +4 -4
  23. package/lib/shared/bundler/webpack/devtoolConfig.js +4 -1
  24. package/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +1 -1
  25. package/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +6 -1
  26. package/lib/shared/bundler/webpack/optimizationConfig.js +15 -2
  27. package/lib/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +5 -1
  28. package/lib/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +76 -0
  29. package/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +1 -1
  30. package/lib/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +25 -13
  31. package/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +2 -1
  32. package/lib/shared/bundler/webpack/plugins.js +2 -2
  33. package/lib/shared/bundler/webpack/resolvers.js +2 -1
  34. package/lib/shared/bundler/webpack/tsLoaders.js +17 -0
  35. package/lib/shared/bundler/webpack/utils/index.js +6 -1
  36. package/lib/shared/bundler/webpack/webpackConfig.js +3 -1
  37. package/lib/shared/fileUtils/watchRun.js +13 -1
  38. package/lib/shared/postcss/custom_postcss_plugins/ValueReplacer.js +3 -2
  39. package/lib/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +4 -0
  40. package/lib/shared/server/getServerURL.js +9 -2
  41. package/npm-shrinkwrap.json +412 -7328
  42. package/package.json +5 -2
  43. package/coverage/addFilesNamesToManifestJson.js.html +0 -148
  44. package/coverage/base.css +0 -224
  45. package/coverage/block-navigation.js +0 -87
  46. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/addFilesNamesToManifestJson.js.html +0 -148
  47. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createInitialEntries.js.html +0 -136
  48. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createManifestJson.js.html +0 -181
  49. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/findInitialFileNames.js.html +0 -133
  50. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.html +0 -146
  51. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.js.html +0 -199
  52. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/removeHashFromFileName.js.html +0 -127
  53. package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js.html +0 -346
  54. package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/index.html +0 -116
  55. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/constants.js.html +0 -94
  56. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js.html +0 -259
  57. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.html +0 -236
  58. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.js.html +0 -442
  59. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/insertBefore.js.html +0 -154
  60. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js.html +0 -142
  61. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js.html +0 -127
  62. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js.html +0 -139
  63. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/specialCases.js.html +0 -184
  64. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js.html +0 -193
  65. package/coverage/bundler/webpack/custom_postcss_plugins/SelectorReplace.js.html +0 -292
  66. package/coverage/bundler/webpack/custom_postcss_plugins/ValueReplacer.js.html +0 -223
  67. package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.html +0 -116
  68. package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.js.html +0 -1126
  69. package/coverage/bundler/webpack/custom_postcss_plugins/index.html +0 -131
  70. package/coverage/bundler/webpack/loaderConfigs/getSpecificPostCssPlugin.js.html +0 -247
  71. package/coverage/bundler/webpack/loaderConfigs/index.html +0 -116
  72. package/coverage/coverage-final.json +0 -4
  73. package/coverage/coverage-summary.json +0 -5
  74. package/coverage/createInitialEntries.js.html +0 -136
  75. package/coverage/dummy.js.html +0 -238
  76. package/coverage/favicon.png +0 -0
  77. package/coverage/index.html +0 -146
  78. package/coverage/index.js.html +0 -169
  79. package/coverage/isObject.js.html +0 -94
  80. package/coverage/isValid.js.html +0 -106
  81. package/coverage/prettify.css +0 -1
  82. package/coverage/prettify.js +0 -2
  83. package/coverage/removeHashFromFileName.js.html +0 -127
  84. package/coverage/sort-arrow-sprite.png +0 -0
  85. package/coverage/sorter.js +0 -196
  86. package/lib/shared/bundler/webpack/custom_plugins/dummy/index.js +0 -54
  87. package/lib/shared/bundler/webpack/pluginConfigs/configDummy.js +0 -13
  88. package/result.json +0 -1
  89. package/unittest/index.html +0 -35
package/README.md CHANGED
@@ -86,228 +86,6 @@ For more [Details](ConfigurationDocumentation.md)
86
86
 
87
87
 
88
88
 
89
- **Feature:-**
90
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
91
- - to use externals, we use the following pattern in `app > externals` :
92
-
93
- For example
94
- ```
95
- externals: {
96
- <key> : <value>
97
- }
98
- ```
99
-
100
- ## v0.0.6 (4-09-2023)
101
-
102
- **Feature:-**
103
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
104
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
105
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
106
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
107
- - added support for glob pattern for custom chunks split logic.
108
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
109
-
110
- **Change:-**
111
- - i18n name not generated issue fix.
112
- - public path not correctly set issue fix.
113
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
114
- ## v0.0.5 (6-08-2023)
115
-
116
- **Changes:--**
117
- - Typo fix in i18nRuntimeDealerPlugin.js
118
- - fixing some bugs in resolvers.js file
119
-
120
- ## v0.0.3 (1-08-2023)
121
-
122
- **Changes:--**
123
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
124
- - unwanted files deleted from build
125
-
126
- **Issue Fix:--**
127
- - The issue with the source map not being created in the build has been fixed."
128
-
129
-
130
- ## v0.0.2 (28-04-2023)
131
-
132
- **Features:-**
133
-
134
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
135
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
136
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
137
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
138
- - `enableChunkHash` renamed as `enableFileNameHashing`
139
-
140
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
141
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
142
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
143
- - `removePropTypes` support for remove the prop types package in the output build.
144
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
145
- - `manifestJson` default value set as false.
146
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
147
-
148
-
149
- ## v0.0.1 (18-04-2023)
150
-
151
- First Release
152
- **Features:-**
153
-
154
- - 'start' command to run react app
155
- - 'build' command to create build for react app
156
- - 'build:lib' command to create lib for react library
157
- - 'build:es' command to create es for react library
158
- - 'templates' command to create es for react library
159
- # Changelog and Release Notes
160
-
161
-
162
-
163
- **Feature:-**
164
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
165
- - to use externals, we use the following pattern in `app > externals` :
166
-
167
- For example
168
- ```
169
- externals: {
170
- <key> : <value>
171
- }
172
- ```
173
-
174
- ## v0.0.6 (4-09-2023)
175
-
176
- **Feature:-**
177
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
178
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
179
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
180
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
181
- - added support for glob pattern for custom chunks split logic.
182
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
183
-
184
- **Change:-**
185
- - i18n name not generated issue fix.
186
- - public path not correctly set issue fix.
187
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
188
- ## v0.0.5 (6-08-2023)
189
-
190
- **Changes:--**
191
- - Typo fix in i18nRuntimeDealerPlugin.js
192
- - fixing some bugs in resolvers.js file
193
-
194
- ## v0.0.3 (1-08-2023)
195
-
196
- **Changes:--**
197
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
198
- - unwanted files deleted from build
199
-
200
- **Issue Fix:--**
201
- - The issue with the source map not being created in the build has been fixed."
202
-
203
-
204
- ## v0.0.2 (28-04-2023)
205
-
206
- **Features:-**
207
-
208
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
209
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
210
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
211
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
212
- - `enableChunkHash` renamed as `enableFileNameHashing`
213
-
214
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
215
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
216
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
217
- - `removePropTypes` support for remove the prop types package in the output build.
218
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
219
- - `manifestJson` default value set as false.
220
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
221
-
222
-
223
- ## v0.0.1 (18-04-2023)
224
-
225
- First Release
226
- **Features:-**
227
-
228
- - 'start' command to run react app
229
- - 'build' command to create build for react app
230
- - 'build:lib' command to create lib for react library
231
- - 'build:es' command to create es for react library
232
- - 'templates' command to create es for react library
233
- # Changelog and Release Notes
234
-
235
-
236
-
237
- **Feature:-**
238
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
239
- - to use externals, we use the following pattern in `app > externals` :
240
-
241
- For example
242
- ```
243
- externals: {
244
- <key> : <value>
245
- }
246
- ```
247
-
248
- ## v0.0.6 (4-09-2023)
249
-
250
- **Feature:-**
251
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
252
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
253
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
254
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
255
- - added support for glob pattern for custom chunks split logic.
256
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
257
-
258
- **Change:-**
259
- - i18n name not generated issue fix.
260
- - public path not correctly set issue fix.
261
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
262
- ## v0.0.5 (6-08-2023)
263
-
264
- **Changes:--**
265
- - Typo fix in i18nRuntimeDealerPlugin.js
266
- - fixing some bugs in resolvers.js file
267
-
268
- ## v0.0.3 (1-08-2023)
269
-
270
- **Changes:--**
271
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
272
- - unwanted files deleted from build
273
-
274
- **Issue Fix:--**
275
- - The issue with the source map not being created in the build has been fixed."
276
-
277
-
278
- ## v0.0.2 (28-04-2023)
279
-
280
- **Features:-**
281
-
282
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
283
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
284
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
285
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
286
- - `enableChunkHash` renamed as `enableFileNameHashing`
287
-
288
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
289
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
290
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
291
- - `removePropTypes` support for remove the prop types package in the output build.
292
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
293
- - `manifestJson` default value set as false.
294
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
295
-
296
-
297
- ## v0.0.1 (18-04-2023)
298
-
299
- First Release
300
- **Features:-**
301
-
302
- - 'start' command to run react app
303
- - 'build' command to create build for react app
304
- - 'build:lib' command to create lib for react library
305
- - 'build:es' command to create es for react library
306
- - 'templates' command to create es for react library
307
- # Changelog and Release Notes
308
-
309
-
310
-
311
89
  **Feature:-**
312
90
  - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
313
91
  - to use externals, we use the following pattern in `app > externals` :
package/README_backup.md CHANGED
@@ -82,225 +82,3 @@ The following commands are available options for the `cbt` (Client Build Tool) C
82
82
  These commands provide flexibility and control over your client-side build process, allowing you to start the development server, build your application, transpile libraries, create templates, run a mock API server, and more.
83
83
 
84
84
  For more [Details](ConfigurationDocumentation.md)
85
- # Changelog and Release Notes
86
-
87
-
88
-
89
- **Feature:-**
90
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
91
- - to use externals, we use the following pattern in `app > externals` :
92
-
93
- For example
94
- ```
95
- externals: {
96
- <key> : <value>
97
- }
98
- ```
99
-
100
- ## v0.0.6 (4-09-2023)
101
-
102
- **Feature:-**
103
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
104
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
105
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
106
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
107
- - added support for glob pattern for custom chunks split logic.
108
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
109
-
110
- **Change:-**
111
- - i18n name not generated issue fix.
112
- - public path not correctly set issue fix.
113
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
114
- ## v0.0.5 (6-08-2023)
115
-
116
- **Changes:--**
117
- - Typo fix in i18nRuntimeDealerPlugin.js
118
- - fixing some bugs in resolvers.js file
119
-
120
- ## v0.0.3 (1-08-2023)
121
-
122
- **Changes:--**
123
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
124
- - unwanted files deleted from build
125
-
126
- **Issue Fix:--**
127
- - The issue with the source map not being created in the build has been fixed."
128
-
129
-
130
- ## v0.0.2 (28-04-2023)
131
-
132
- **Features:-**
133
-
134
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
135
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
136
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
137
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
138
- - `enableChunkHash` renamed as `enableFileNameHashing`
139
-
140
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
141
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
142
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
143
- - `removePropTypes` support for remove the prop types package in the output build.
144
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
145
- - `manifestJson` default value set as false.
146
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
147
-
148
-
149
- ## v0.0.1 (18-04-2023)
150
-
151
- First Release
152
- **Features:-**
153
-
154
- - 'start' command to run react app
155
- - 'build' command to create build for react app
156
- - 'build:lib' command to create lib for react library
157
- - 'build:es' command to create es for react library
158
- - 'templates' command to create es for react library
159
- # Changelog and Release Notes
160
-
161
-
162
-
163
- **Feature:-**
164
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
165
- - to use externals, we use the following pattern in `app > externals` :
166
-
167
- For example
168
- ```
169
- externals: {
170
- <key> : <value>
171
- }
172
- ```
173
-
174
- ## v0.0.6 (4-09-2023)
175
-
176
- **Feature:-**
177
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
178
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
179
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
180
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
181
- - added support for glob pattern for custom chunks split logic.
182
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
183
-
184
- **Change:-**
185
- - i18n name not generated issue fix.
186
- - public path not correctly set issue fix.
187
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
188
- ## v0.0.5 (6-08-2023)
189
-
190
- **Changes:--**
191
- - Typo fix in i18nRuntimeDealerPlugin.js
192
- - fixing some bugs in resolvers.js file
193
-
194
- ## v0.0.3 (1-08-2023)
195
-
196
- **Changes:--**
197
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
198
- - unwanted files deleted from build
199
-
200
- **Issue Fix:--**
201
- - The issue with the source map not being created in the build has been fixed."
202
-
203
-
204
- ## v0.0.2 (28-04-2023)
205
-
206
- **Features:-**
207
-
208
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
209
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
210
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
211
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
212
- - `enableChunkHash` renamed as `enableFileNameHashing`
213
-
214
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
215
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
216
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
217
- - `removePropTypes` support for remove the prop types package in the output build.
218
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
219
- - `manifestJson` default value set as false.
220
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
221
-
222
-
223
- ## v0.0.1 (18-04-2023)
224
-
225
- First Release
226
- **Features:-**
227
-
228
- - 'start' command to run react app
229
- - 'build' command to create build for react app
230
- - 'build:lib' command to create lib for react library
231
- - 'build:es' command to create es for react library
232
- - 'templates' command to create es for react library
233
- # Changelog and Release Notes
234
-
235
-
236
-
237
- **Feature:-**
238
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
239
- - to use externals, we use the following pattern in `app > externals` :
240
-
241
- For example
242
- ```
243
- externals: {
244
- <key> : <value>
245
- }
246
- ```
247
-
248
- ## v0.0.6 (4-09-2023)
249
-
250
- **Feature:-**
251
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
252
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
253
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
254
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
255
- - added support for glob pattern for custom chunks split logic.
256
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
257
-
258
- **Change:-**
259
- - i18n name not generated issue fix.
260
- - public path not correctly set issue fix.
261
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
262
- ## v0.0.5 (6-08-2023)
263
-
264
- **Changes:--**
265
- - Typo fix in i18nRuntimeDealerPlugin.js
266
- - fixing some bugs in resolvers.js file
267
-
268
- ## v0.0.3 (1-08-2023)
269
-
270
- **Changes:--**
271
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
272
- - unwanted files deleted from build
273
-
274
- **Issue Fix:--**
275
- - The issue with the source map not being created in the build has been fixed."
276
-
277
-
278
- ## v0.0.2 (28-04-2023)
279
-
280
- **Features:-**
281
-
282
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
283
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
284
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
285
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
286
- - `enableChunkHash` renamed as `enableFileNameHashing`
287
-
288
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
289
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
290
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
291
- - `removePropTypes` support for remove the prop types package in the output build.
292
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
293
- - `manifestJson` default value set as false.
294
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
295
-
296
-
297
- ## v0.0.1 (18-04-2023)
298
-
299
- First Release
300
- **Features:-**
301
-
302
- - 'start' command to run react app
303
- - 'build' command to create build for react app
304
- - 'build:lib' command to create lib for react library
305
- - 'build:es' command to create es for react library
306
- - 'templates' command to create es for react library
@@ -54,6 +54,10 @@ var _default = {
54
54
  cli: 'print_progress'
55
55
  },
56
56
  server: {
57
+ k8s: {
58
+ value: false,
59
+ cli: 'k8s'
60
+ },
57
61
  httpsCerts: {
58
62
  value: '',
59
63
  cli: 'https_certs'
@@ -277,7 +281,9 @@ var _default = {
277
281
  i18nTemplate: ''
278
282
  },
279
283
  manifestJson: {
280
- enable: false
284
+ enable: false,
285
+ i18nManifestJson: false,
286
+ licenseManifest: false
281
287
  },
282
288
  changeRuntimeChunkChar: '~',
283
289
  serviceWorker: {
@@ -291,6 +297,7 @@ var _default = {
291
297
  allowPrefetchingMultipleChunks: false
292
298
  },
293
299
  devModeContentHashAllowedTypes: null,
300
+ nameTemplateCustomization: null,
294
301
  devLikeHash: {
295
302
  value: false,
296
303
  cli: 'dev_like_hash'
@@ -323,6 +330,20 @@ var _default = {
323
330
  cssAttributes: null,
324
331
  i18nAttributes: null
325
332
  },
326
- externals: null
333
+ externals: null,
334
+ typeScript: {
335
+ enable: {
336
+ value: false,
337
+ cli: 'type_script_enable'
338
+ }
339
+ },
340
+ optimization: {
341
+ jsExcludePath: '',
342
+ cssExcludePath: ''
343
+ },
344
+ customScriptLoadingStrategey: {
345
+ enable: false,
346
+ options: null
347
+ }
327
348
  };
328
349
  exports.default = _default;
@@ -25,6 +25,39 @@ const args = process.argv.slice(2);
25
25
  exports.args = args;
26
26
  const processEnv = (0, _npmConfigToObject.npmConfigToObject)();
27
27
  const cliArgsObject = (0, _cliArgsToObject.cliArgsToObject)(args);
28
+
29
+ if (cliArgsObject.app_domain && cliArgsObject.app_domain == 'kubernetes') {
30
+ cliArgsObject.k8s = true;
31
+ }
32
+
33
+ if (cliArgsObject.app_domain) {
34
+ cliArgsObject.domain = cliArgsObject.app_domain;
35
+ }
36
+
37
+ if (cliArgsObject.app_port) {
38
+ cliArgsObject.port = cliArgsObject.app_port;
39
+ }
40
+
41
+ if (cliArgsObject.app_host) {
42
+ cliArgsObject.host = cliArgsObject.app_host;
43
+ }
44
+
45
+ if (processEnv.app_domain && processEnv.app_domain == 'kubernetes') {
46
+ cliArgsObject.k8s = true;
47
+ }
48
+
49
+ if (processEnv.app_domain) {
50
+ cliArgsObject.domain = processEnv.app_domain;
51
+ }
52
+
53
+ if (processEnv.app_port) {
54
+ cliArgsObject.port = processEnv.app_port;
55
+ }
56
+
57
+ if (processEnv.app_host) {
58
+ cliArgsObject.host = processEnv.app_host;
59
+ }
60
+
28
61
  Object.assign(processEnv, cliArgsObject);
29
62
  let reactCLIOptions = null;
30
63
 
@@ -25,8 +25,11 @@ function babelWebConfig(options, mode) {
25
25
  plugins: babelPlugins,
26
26
  browserList
27
27
  } = options.babelCustomizations;
28
+ const {
29
+ enable: typeScriptEnable
30
+ } = options.typeScript;
28
31
  return {
29
- presets: [getBabelPresetEnvConfig(browserList, mode), require.resolve('@babel/preset-react')],
32
+ presets: typeScriptEnable ? [getBabelPresetEnvConfig(browserList, mode), require.resolve('@babel/preset-react'), require.resolve('@babel/preset-typescript')] : [getBabelPresetEnvConfig(browserList, mode), require.resolve('@babel/preset-react')],
30
33
  plugins: customBabelPlugins(babelPlugins).concat((0, _getBabelPlugin.getBabelPlugin)(options)).filter(Boolean)
31
34
  };
32
35
  }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.runBabelForTSFile = runBabelForTSFile;
7
+
8
+ var _core = require("@babel/core");
9
+
10
+ var _babelWebConfig = require("./babelWebConfig");
11
+
12
+ var _copyFile = require("../fileUtils/copyFile");
13
+
14
+ function runBabelForTSFile({
15
+ filename,
16
+ outputFile,
17
+ options,
18
+ mode = 'es'
19
+ }) {
20
+ const {
21
+ enable
22
+ } = options.typeScript;
23
+
24
+ if (enable) {
25
+ // const jsSourceCode = readFileSync(filename).toString();
26
+ const babelConfig = (0, _babelWebConfig.babelWebConfig)(options, mode);
27
+ const result = (0, _core.transformFileSync)(filename, babelConfig);
28
+ (0, _copyFile.writeFile)(outputFile.replace('.tsx', '.js'), result.code);
29
+ }
30
+ }
@@ -24,17 +24,22 @@ function modifiedServerOptions(options) {
24
24
  const {
25
25
  disableContextURL
26
26
  } = server;
27
+ const {
28
+ k8s
29
+ } = server;
27
30
  const port = Number(server.port);
28
31
  const httpsOptions = (0, _httpsOptions.httpsOptionsWithUserFriendlyError)(options);
29
32
  const machineDomain = (0, _getServerURL.getServerDomain)(server);
30
33
  const httpPort = port + 1;
31
34
  const httpsUrl = (0, _getServerURL.getServerUrl)({
32
35
  domain: machineDomain,
36
+ k8s,
33
37
  port,
34
38
  protocol: 'https'
35
39
  });
36
40
  const httpUrl = (0, _getServerURL.getServerUrl)({
37
41
  domain: machineDomain,
42
+ k8s,
38
43
  port: httpPort,
39
44
  protocol: 'http'
40
45
  });
@@ -12,16 +12,16 @@ var _modeUtils = require("./modeUtils");
12
12
  // NOTE: these below code can be done in js,
13
13
  // we did copy paste in order to avoid unnecessary confusion
14
14
  // NOTE: array[0] is dev mode file templates and array[1] is prod mode file templates
15
- const templates = {
15
+ const defaultTemplates = {
16
16
  html: ['index.html', 'index.[contenthash].html'],
17
- js: ['js/[name].js', 'js/[name].[contenthash].js'],
18
- chunkjs: ['js-chunks/[name].js', 'js-chunks/[name].[contenthash].js'],
19
- i18njs: ['i18n-chunks/[locale]/[name].i18n.js', 'i18n-chunks/[locale]/[name].[chunkhash].i18n.js'],
20
- i18nchunkjs: ['i18n-chunks/[locale]/[name].i18n.js', // 'i18n-chunks/[locale]/[name].[chunkhash].i18n.js'
21
- 'i18n-chunks/[locale]/[name].[contenthash].i18n.js'],
17
+ js: ['js/[name].js', 'js/[name].[contenthash]_.js'],
18
+ chunkjs: ['js-chunk/[name].js', 'js-chunks/[name].[contenthash]_.js'],
19
+ i18njs: ['i18n-chunk/[locale]/[name].i18n.js', 'i18n-chunk/[locale]/[name].[chunkhash:20]_.i18n.js'],
20
+ i18nchunkjs: ['i18n-chunk/[locale]/[name].i18n.js', // 'i18n-chunk/[locale]/[name].[chunkhash].i18n.js'
21
+ 'i18n-chunk/[locale]/[name].[contenthash]_.i18n.js'],
22
22
  i18nmanifest: ['i18n-manifest.json', 'i18n-manifest.json'],
23
23
  workerjs: ['js/[name].js', 'js/[name].[contenthash].js'],
24
- css: ['css/[name].css', 'css/[name].[contenthash].css'],
24
+ css: ['css/[name].css', 'css/[name].[contenthash]_.css'],
25
25
 
26
26
  /**
27
27
  * NOTE: when you change (cssdir) this line it will have affect on Below files will be affected
@@ -29,7 +29,7 @@ const templates = {
29
29
  * pluginConfigs/configMiniCSSExtractPlugin.js
30
30
  * pluginConfigs/configRtlCssPlugin.js
31
31
  * */
32
- cssdir: ['css/[name].[dir].css', 'css/[name].[contenthash].[dir].css'],
32
+ cssdir: ['css/[name].[dir].css', 'css/[name].[contenthash]_.[dir].css'],
33
33
  image: ['images/[name][ext]', 'images/[name].[contenthash][ext]'],
34
34
  font: ['fonts/[name][ext]', 'fonts/[name].[contenthash][ext]'],
35
35
  svg: ['fonts/[name][ext]', 'fonts/[name].[contenthash][ext]'],
@@ -54,12 +54,16 @@ function nameTemplates(type, options) {
54
54
  const {
55
55
  enableFileNameHashing,
56
56
  mode,
57
- devLikeHash
57
+ devLikeHash,
58
+ nameTemplateCustomization
58
59
  } = options;
59
60
  let {
60
61
  devModeContentHashAllowedTypes
61
62
  } = options;
62
63
  devModeContentHashAllowedTypes = devModeContentHashAllowedTypes || defaultDevModeContentHashAllowedTypes;
64
+ const templates = { ...defaultTemplates,
65
+ ...nameTemplateCustomization
66
+ };
63
67
  const templateName = templates[type];
64
68
 
65
69
  if (!templateName) {