@zohodesk/client_build_tool 0.0.20-experimental.1 → 0.0.20

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 (236) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +9 -207
  3. package/README_backup.md +0 -214
  4. package/es/allCommandsConfigs.js +15 -0
  5. package/es/commands/build/commandExecutor.js +6 -0
  6. package/es/commands/build/config.js +5 -0
  7. package/es/commands/build/optionsProcessor.js +25 -0
  8. package/es/commands/build/preProcessor.js +4 -0
  9. package/es/commands/buildEs/commandExecutor.js +29 -0
  10. package/es/commands/buildEs/config.js +5 -0
  11. package/es/commands/buildEs/preProcessor.js +9 -0
  12. package/es/commands/buildLib/commandExecutor.js +24 -0
  13. package/es/commands/buildLib/config.js +5 -0
  14. package/es/commands/buildLib/preProcessor.js +9 -0
  15. package/es/commands/mockserver/commandExecutor.js +32 -0
  16. package/es/commands/mockserver/config.js +5 -0
  17. package/es/commands/pre_process/commandExecutor.js +10 -0
  18. package/es/commands/pre_process/config.js +5 -0
  19. package/es/commands/start/commandExecutor.js +4 -0
  20. package/es/commands/start/config.js +5 -0
  21. package/es/commands/start/optionsProcessor.js +21 -0
  22. package/es/commands/start/preProcessor.js +4 -0
  23. package/es/commands/template/commandExecutor.js +17 -0
  24. package/es/commands/template/config.js +5 -0
  25. package/es/commands/version/commandExecutor.js +5 -0
  26. package/es/commands/version/config.js +5 -0
  27. package/es/commandsRouter.js +58 -0
  28. package/es/index.js +4 -0
  29. package/es/logger.js +23 -0
  30. package/es/schemas/applyValuesToSchema/index.js +25 -0
  31. package/es/schemas/applyValuesToSchema/isObject.js +3 -0
  32. package/es/schemas/applyValuesToSchema/isValid.js +7 -0
  33. package/es/schemas/cliArgsToObject.js +32 -0
  34. package/es/schemas/defaultConfigValues.js +394 -0
  35. package/es/schemas/defaultConfigValuesOnly.js +196 -0
  36. package/es/schemas/deprecatedOptionsHandler.js +60 -0
  37. package/es/schemas/getNpmVersion.js +13 -0
  38. package/es/schemas/giveDefaultValue.js +11 -0
  39. package/es/schemas/npmConfigToObject.js +27 -0
  40. package/es/schemas/readOptions.js +67 -0
  41. package/es/schemas/readOptionsForConfigFile.js +28 -0
  42. package/es/shared/babel/addDefaultPlugins.js +8 -0
  43. package/es/shared/babel/babelWebConfig.js +43 -0
  44. package/es/shared/babel/babel_plugins/removeAttributesPlugin.js +21 -0
  45. package/es/shared/babel/getBabelPlugin.js +36 -0
  46. package/es/shared/babel/runBabelForJSFile.js +15 -0
  47. package/es/shared/babel/runBabelForTsFile.js +34 -0
  48. package/es/shared/bundler/webpack/common/decidePublicPath.js +45 -0
  49. package/es/shared/bundler/webpack/common/libAlias.js +24 -0
  50. package/es/shared/bundler/webpack/common/modeUtils.js +24 -0
  51. package/es/shared/bundler/webpack/common/nameTemplates.js +95 -0
  52. package/es/shared/bundler/webpack/common/resourceBasedPublicPath.js +12 -0
  53. package/es/shared/bundler/webpack/configCustomLoaders.js +3 -0
  54. package/es/shared/bundler/webpack/cssLoaders.js +8 -0
  55. package/es/shared/bundler/webpack/custom_plugins/BundleIntegrityReport/index.js +76 -0
  56. package/es/shared/bundler/webpack/custom_plugins/CdnChangePlugin/index.js +102 -0
  57. package/es/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +36 -0
  58. package/es/shared/bundler/webpack/custom_plugins/ChunkHierarchyPlugin.js +65 -0
  59. package/es/shared/bundler/webpack/custom_plugins/CssCustomOrderPlugin.js +37 -0
  60. package/es/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +97 -0
  61. package/es/shared/bundler/webpack/custom_plugins/EFCTemplatePlugin.js +98 -0
  62. package/es/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin.js +211 -0
  63. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +11 -0
  64. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nFilesEmitPlugin.js +160 -0
  65. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +66 -0
  66. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nRuntimeDealerPlugin.js +201 -0
  67. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +95 -0
  68. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/LocaleChunkAssetsStore.js +59 -0
  69. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ModulesI18nKeysStore.js +82 -0
  70. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +25 -0
  71. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +13 -0
  72. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +15 -0
  73. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +72 -0
  74. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +23 -0
  75. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/iterateModulesInChunk.js +40 -0
  76. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +59 -0
  77. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +15 -0
  78. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +22 -0
  79. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +35 -0
  80. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +70 -0
  81. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +56 -0
  82. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/getChunkModules.js +6 -0
  83. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +10 -0
  84. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +2 -0
  85. package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +121 -0
  86. package/es/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +85 -0
  87. package/es/shared/bundler/webpack/custom_plugins/InjectChunkGraphPlugin.js +47 -0
  88. package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +20 -0
  89. package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +11 -0
  90. package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +26 -0
  91. package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/findInitialFileNames.js +11 -0
  92. package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/index.js +34 -0
  93. package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/removeHashFromFileName.js +11 -0
  94. package/es/shared/bundler/webpack/custom_plugins/MurphyInjectorPlugin/index.js +79 -0
  95. package/es/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -0
  96. package/es/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +185 -0
  97. package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +47 -0
  98. package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +70 -0
  99. package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +34 -0
  100. package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +14 -0
  101. package/es/shared/bundler/webpack/custom_plugins/RuntimeResourceCleanup/index.js +63 -0
  102. package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/classHandling.js +9 -0
  103. package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/index.js +63 -0
  104. package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/selectorWeightPrefixAdder.js +43 -0
  105. package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/windowsModification.js +7 -0
  106. package/es/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +104 -0
  107. package/es/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +6 -0
  108. package/es/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +74 -0
  109. package/es/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/addHashToFilePath.js +10 -0
  110. package/es/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +36 -0
  111. package/es/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/index.js.js +35 -0
  112. package/es/shared/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js +52 -0
  113. package/es/shared/bundler/webpack/custom_plugins/VariableConversionCollector/index.js +341 -0
  114. package/es/shared/bundler/webpack/custom_plugins/custom_attribute_plugin/index.js +67 -0
  115. package/es/shared/bundler/webpack/custom_plugins/emitAsset.js +7 -0
  116. package/es/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +43 -0
  117. package/es/shared/bundler/webpack/custom_plugins/getInitialI18nAssetsArrayStr.js +79 -0
  118. package/es/shared/bundler/webpack/defaultVendorPatternList.js +3 -0
  119. package/es/shared/bundler/webpack/devtoolConfig.js +6 -0
  120. package/es/shared/bundler/webpack/entryConfig.js +25 -0
  121. package/es/shared/bundler/webpack/externals.js +10 -0
  122. package/es/shared/bundler/webpack/getCSSLoaders.js +17 -0
  123. package/es/shared/bundler/webpack/getFilenameFromModule.js +15 -0
  124. package/es/shared/bundler/webpack/jsLoaders.js +16 -0
  125. package/es/shared/bundler/webpack/loaderConfigs/assetLoaders.js +4 -0
  126. package/es/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +10 -0
  127. package/es/shared/bundler/webpack/loaderConfigs/checkIsPatternsMatchFilename.js +45 -0
  128. package/es/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +11 -0
  129. package/es/shared/bundler/webpack/loaderConfigs/configPostCssLoader.js +23 -0
  130. package/es/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +13 -0
  131. package/es/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +71 -0
  132. package/es/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +56 -0
  133. package/es/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +11 -0
  134. package/es/shared/bundler/webpack/loaderConfigs/i18nIdReplaceLoaderConfig.js +40 -0
  135. package/es/shared/bundler/webpack/loaders/i18nIdReplaceLoader.js +116 -0
  136. package/es/shared/bundler/webpack/loaders/miniCssFallBackLoader.js +5 -0
  137. package/es/shared/bundler/webpack/loaders/workerLoader.js +121 -0
  138. package/es/shared/bundler/webpack/optimizationConfig.js +42 -0
  139. package/es/shared/bundler/webpack/outputConfig.js +35 -0
  140. package/es/shared/bundler/webpack/pluginConfigs/configBundleAnalyzer.js +30 -0
  141. package/es/shared/bundler/webpack/pluginConfigs/configBundleIntegrityReport.js +27 -0
  142. package/es/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +17 -0
  143. package/es/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +16 -0
  144. package/es/shared/bundler/webpack/pluginConfigs/configChunkHierarchyPlugin.js +10 -0
  145. package/es/shared/bundler/webpack/pluginConfigs/configCopyPublicFolders.js +50 -0
  146. package/es/shared/bundler/webpack/pluginConfigs/configCssCustomOrderPlugin.js +8 -0
  147. package/es/shared/bundler/webpack/pluginConfigs/configCustomAttributesPlugin.js +12 -0
  148. package/es/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +67 -0
  149. package/es/shared/bundler/webpack/pluginConfigs/configEFCTemplatePlugin.js +37 -0
  150. package/es/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +43 -0
  151. package/es/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +52 -0
  152. package/es/shared/bundler/webpack/pluginConfigs/configI18nNumericIndexPlugin.js +17 -0
  153. package/es/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +29 -0
  154. package/es/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +8 -0
  155. package/es/shared/bundler/webpack/pluginConfigs/configInjectChunkGraphPlugin.js +12 -0
  156. package/es/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +36 -0
  157. package/es/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +13 -0
  158. package/es/shared/bundler/webpack/pluginConfigs/configMurphyInjectorPlugin.js +19 -0
  159. package/es/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +18 -0
  160. package/es/shared/bundler/webpack/pluginConfigs/configResourceHintsPlugin.js +11 -0
  161. package/es/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +19 -0
  162. package/es/shared/bundler/webpack/pluginConfigs/configRuntimeResourceCleanup.js +20 -0
  163. package/es/shared/bundler/webpack/pluginConfigs/configSelectorWeightPlugin.js +18 -0
  164. package/es/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +29 -0
  165. package/es/shared/bundler/webpack/pluginConfigs/configSourceMapPlugin.js +12 -0
  166. package/es/shared/bundler/webpack/pluginConfigs/configTPHashMappingPlugin.js +20 -0
  167. package/es/shared/bundler/webpack/pluginConfigs/configVariableConversionPlugin.js +15 -0
  168. package/es/shared/bundler/webpack/plugins.js +33 -0
  169. package/es/shared/bundler/webpack/resolvers.js +70 -0
  170. package/es/shared/bundler/webpack/splitChunksConfig.js +106 -0
  171. package/es/shared/bundler/webpack/statsConfig.js +23 -0
  172. package/es/shared/bundler/webpack/tsLoaders.js +16 -0
  173. package/es/shared/bundler/webpack/utils/index.js +8 -0
  174. package/es/shared/bundler/webpack/utils/object-manipulation.js +82 -0
  175. package/es/shared/bundler/webpack/utils/updateArrayWithDefault.js +29 -0
  176. package/es/shared/bundler/webpack/webpackBuild.js +14 -0
  177. package/es/shared/bundler/webpack/webpackConfig.js +35 -0
  178. package/es/shared/commands-utils/doBasicRequirementCheck.js +10 -0
  179. package/es/shared/commands-utils/getCliPath.js +28 -0
  180. package/es/shared/commands-utils/index.js +3 -0
  181. package/es/shared/commands-utils/log.js +4 -0
  182. package/es/shared/commands-utils/readArgsFormCommandLine.js +4 -0
  183. package/es/shared/commands-utils/readOptionFormCommandLine.js +4 -0
  184. package/es/shared/commands-utils/spawnSyncIO.js +24 -0
  185. package/es/shared/constants.js +22 -0
  186. package/es/shared/fileUtils/copyFile.js +23 -0
  187. package/es/shared/fileUtils/directoryIterator.js +12 -0
  188. package/es/shared/fileUtils/watchRun.js +96 -0
  189. package/es/shared/postcss/custom_postcss_plugins/EmptyPlugin.js +18 -0
  190. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/constants.js +2 -0
  191. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js +58 -0
  192. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/index.js +122 -0
  193. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/insertBefore.js +22 -0
  194. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js +11 -0
  195. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js +13 -0
  196. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js +17 -0
  197. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/specialCases.js +32 -0
  198. package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js +28 -0
  199. package/es/shared/postcss/custom_postcss_plugins/RTLSplitPlugin.js +125 -0
  200. package/es/shared/postcss/custom_postcss_plugins/SelectorReplace.js +82 -0
  201. package/es/shared/postcss/custom_postcss_plugins/ValueReplacer.js +50 -0
  202. package/es/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +318 -0
  203. package/es/shared/postcss/filterPluginsAllowedForSpecficFile.js +41 -0
  204. package/es/shared/postcss/getAllowedPostCssPlugins.js +20 -0
  205. package/es/shared/postcss/getSpecificPostCssPlugin.js +38 -0
  206. package/es/shared/postcss/runPostCssForCssFile.js +25 -0
  207. package/es/shared/pre_process/runPreProcess.js +47 -0
  208. package/es/shared/server/configWebpackDevMiddleware.js +26 -0
  209. package/es/shared/server/corsHandling.js +23 -0
  210. package/es/shared/server/getIp.js +18 -0
  211. package/es/shared/server/getServerURL.js +28 -0
  212. package/es/shared/server/httpsOptions.js +36 -0
  213. package/es/shared/server/initExpressApp.js +9 -0
  214. package/es/shared/server/initialHTMLHandling.js +92 -0
  215. package/es/shared/server/mockApiHandler.js +53 -0
  216. package/es/shared/server/mockServer.js +34 -0
  217. package/es/shared/server/serveContextFiles.js +17 -0
  218. package/es/shared/server/serverBywebpackDevMiddleware.js +21 -0
  219. package/es/shared/server/startHttpServer.js +18 -0
  220. package/es/shared/server/startHttpsServer.js +26 -0
  221. package/es/shared/server/unwanted/addHttp2Server.js +32 -0
  222. package/es/shared/server/unwanted/configWebpackDevMiddleware.js +35 -0
  223. package/es/shared/server/unwanted/mockApiSupport.js +11 -0
  224. package/es/shared/server/unwanted/websocketMockSetup.js +36 -0
  225. package/es/shared/server/urlConcat.js +35 -0
  226. package/es/shared/utils/requireLocalOrGlobal.js +57 -0
  227. package/es/shared/utils/utils.js +0 -0
  228. package/es/shared/utils/versionPrint.js +9 -0
  229. package/lib/commands/buildEs/commandExecutor.js +14 -9
  230. package/lib/commands/buildLib/commandExecutor.js +14 -9
  231. package/lib/shared/bundler/webpack/loaderConfigs/i18nIdReplaceLoaderConfig.js +0 -8
  232. package/lib/shared/bundler/webpack/loaders/i18nIdReplaceLoader.js +1 -1
  233. package/npm-shrinkwrap.json +20 -32
  234. package/package.json +2 -2
  235. package/.claude/settings.local.json +0 -43
  236. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/utils/i18nDataLoader.js +0 -114
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog and Release Notes
2
2
 
3
+ # v0.0.20 (04-02-2026)
4
+
5
+ **Feature:i18n Numeric Indexing Support-**
6
+ - Added support for i18n numeric indexing, which replaces string-based i18n keys with numeric IDs at build time to reduce bundle size.
7
+
8
+ Introduced i18nIdReplaceLoader, which parses source files and replaces i18n string keys with corresponding numeric IDs using numericMap.json.
9
+
10
+ Implemented I18nNumericIndexPlugin, which reads all locale .properties files and generates locale-specific JSON chunks with numeric IDs as keys instead of string keys.
11
+
12
+ Supports single-file and split-file output modes, along with manifest generation.
13
+
14
+ **Feature:Enhancement: Library Conversion via Build Commands-**
15
+
16
+ Enhanced build:es and build:lib commands to support multiple input folders.
17
+ For eg :- cbt build:es src,assets es,target
18
+
3
19
  # v0.0.19 (06-01-2026)
4
20
 
5
21
  **Feature:-**
package/README.md CHANGED
@@ -475,219 +475,21 @@ First Release
475
475
  - 'templates' command to create es for react library
476
476
  # Changelog and Release Notes
477
477
 
478
- # v0.0.19 (06-01-2026)
479
-
480
- **Feature:-**
481
- - During class name generation, when the template included the file name, it was converted to lowercase by default. Support has now been added to include the file name as class names in a case-insensitive manner.
482
-
483
- ```
484
- css: {
485
- classNameOptions: {
486
- caseOnlyFilename: true
487
- }
488
- }
489
- ```
490
-
491
-
492
- **Adjustments:-**
493
- - issue in CssCustomOrderPlugin has been fixed
494
- - customChunks default pattern for styles is removed (important)
495
-
496
-
497
- # v0.0.18 (23-12-2025)(issue in CssCustomOrderPlugin)
498
-
499
- **Adjustments:-**
500
- - remove the unwanted console in the previous version
501
- - html not creation issue due to the generate html option fixed
502
-
503
- # v0.0.17 (22-12-2025) (html not creation issue) (issue in CssCustomOrderPlugin)
504
-
505
- **revert:-**
506
- - InjectChunkGraphPlugin and the pfc and plc functions were reverted due to UAT issues unrelated to our tool. Consequently, the plugin could not be included in this version. we rewriting the plc and pfc in resource hints plugins recently, it will function correctly when the new plugin is enabled,so revert this changes from this version
507
-
508
-
509
- **Feature:-**
510
- - `alias` support for `build:es` and `build:lib`
511
- - Add babel-plugin-module-resolver dependencies for library only
512
- - Modify getBabelPlugin to include module resolver with aliases
513
- - An additional entry point support has been added.
514
- - An option for HTML generation has been provided.
515
- - Support for CssCustomOrderPlugin has been added.
516
-
517
- **Adjustments:-**
518
- - ChunkHierarchyPlugin.js – modified and rewrite the plugin to get the proper output (this is the stable version of this plugin).
519
-
520
-
521
- # v0.0.16 (05-11-2025) (deprecated)
522
-
523
- **Adjustments:-**
524
- - ChunkHierarchyPlugin.js – Added support for ConcatenatedModule modules.
525
- - InjectChunkGraphPlugin.js – Changed the template name from {{--preload-chunk-graph-object}} to __PRELOAD_CHUNK_GRAPH__ to resolve minification issues.
526
- - Disabled CSS source map generation – CSS source maps were being created when RTL split was disabled and sourceMap was enabled, causing issues. Hence, CSS source map creation has been disabled
527
- - Source map path correction – The resolving paths in source map files appeared as zohodesk-react/./src, which was incompatible with the Murphy tool. Updated it to zohodesk-react/src by adding a function to devtoolModuleFilenameTemplate in the output configuration.
528
- - ChunkHierarchyPlugin – Made it active in development mode as well by removing the “run only in production” condition.
529
-
530
- # v0.0.15 (11-10-2025) (deprecated)
531
-
532
- **Feature:-**
533
- - Chunk Dependency Mapping: Added a new feature that generates a JSON file listing all chunk dependencies in the Webpack build
534
- For example, if main.js is a chunk, the generated JSON will include all of its direct imports (dependencies).
535
- - Purpose:
536
- To provide clear visibility into chunk relationships and dependencies for debugging, optimization, and performance analysis.
537
-
538
- ```
539
- chunkGraph:{
540
- enable: { value: true },
541
- fileName: ''
542
- }
543
- ```
544
-
545
- - Preload Chunk Split Visualization
546
- Enhanced the Preload Chunk (PLC) mechanism to identify and list the sub-chunks generated from a preloaded parent chunk.
547
- When a chunk is configured for preloading (e.g., ticket.js), the system now traces and records all the split chunks associated with it
548
-
549
- rewrite the plc and pfc fucntion in resourceHints plugin and created a new plugin to inject the sub chunks of the preloaded chunks in runtime file
550
-
551
- if resourceHints not enabled plc , pfc and custom function related to this are not created
552
-
553
- ```
554
- resourceHints: {
555
- enable: true,
556
- PreloadChunkNames: [//name of chunks to be preload//]
557
- },
558
- ```
559
-
560
-
561
- # v0.0.14 (06-10-2025)
562
-
563
- **Feature:-**
564
- - Added integrity and crossorigin attributes for all the js and css files in index.html
565
-
566
- ```enableSubResourceIntegrity: true
567
- ```
568
- **Adjustments:-**
569
- - add ts-loader to parse tsx and ts files
478
+ # v0.0.20 (04-02-2026)
570
479
 
571
- # v0.0.13 (02-09-2025)
480
+ **Feature:i18n Numeric Indexing Support-**
481
+ - Added support for i18n numeric indexing, which replaces string-based i18n keys with numeric IDs at build time to reduce bundle size.
572
482
 
573
- **Adjustments:-**
574
- - Source map files are created in the smap/ folder by default. However, they are also being created in the js/ folder to resolve the issue where Murphy was unable to locate them.
483
+ Introduced i18nIdReplaceLoader, which parses source files and replaces i18n string keys with corresponding numeric IDs using numericMap.json.
575
484
 
576
- **Feature:-**
577
- - Added support for Murphy to be built as a separate chunk and injected as the top script in the initial HTML.
578
- - To enable this support , add this in your configuration
579
-
580
- ```murphyBootstrapHtml{
581
- enable: true,
582
- chunkName: '',
583
- filePath: ''
584
- }```
485
+ Implemented I18nNumericIndexPlugin, which reads all locale .properties files and generates locale-specific JSON chunks with numeric IDs as keys instead of string keys.
585
486
 
487
+ Supports single-file and split-file output modes, along with manifest generation.
586
488
 
489
+ **Feature:Enhancement: Library Conversion via Build Commands-**
587
490
 
588
- # v0.0.12 (14-08-2025)
589
-
590
- - Fixed the initial i18n loading issue caused by using the same function in both the i18nRuntimeDealer plugin and decidePublicPath
591
-
592
- # v0.0.11 (07-08-2025) (had an issue while enable i18n chunk split plugin)
593
- - remove babel-plugin-module-resolver dependencies
594
-
595
- **Adjustments:-**
596
- - Public Folder configuration is separated for development and production
597
-
598
- **Bug Fix:-**
599
- - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
600
- - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
601
- - Fixed the issue where a space in the variable name causes it to return an undefined value.
602
- - Fixed the URL path generation issue that occurred while using context in the development setup.
603
-
604
-
605
- # v0.0.10 (12-05-2025)
606
- **Feature:-**
607
- - `alias` support for `build:es` and `build:lib`
608
- - Add babel-plugin-module-resolver dependencies
609
- - Modify getBabelPlugin to include module resolver with aliases
610
-
611
- **Bug Fix:-**
612
- - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
613
- - Update mockApiHandler to ensure mock function is called correctly
614
-
615
- **Change:-**
616
- - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
617
-
618
- ## v0.0.9
619
-
620
- **Feature:-**
621
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
622
- - to use externals, we use the following pattern in `app > externals` :
623
-
624
- For example
625
- ```
626
- externals: {
627
- <key> : <value>
628
- }
629
- ```
630
-
631
- ## v0.0.6 (4-09-2023)
632
-
633
- **Feature:-**
634
- - 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`.
635
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
636
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
637
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
638
- - added support for glob pattern for custom chunks split logic.
639
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
640
-
641
- **Change:-**
642
- - i18n name not generated issue fix.
643
- - public path not correctly set issue fix.
644
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
645
- ## v0.0.5 (6-08-2023)
646
-
647
- **Changes:--**
648
- - Typo fix in i18nRuntimeDealerPlugin.js
649
- - fixing some bugs in resolvers.js file
650
-
651
- ## v0.0.3 (1-08-2023)
652
-
653
- **Changes:--**
654
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
655
- - unwanted files deleted from build
656
-
657
- **Issue Fix:--**
658
- - The issue with the source map not being created in the build has been fixed."
659
-
660
-
661
- ## v0.0.2 (28-04-2023)
662
-
663
- **Features:-**
664
-
665
- - `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)
666
- - `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)
667
- - `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.
668
- - `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.
669
- - `enableChunkHash` renamed as `enableFileNameHashing`
670
-
671
- - `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`)
672
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
673
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
674
- - `removePropTypes` support for remove the prop types package in the output build.
675
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
676
- - `manifestJson` default value set as false.
677
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
678
-
679
-
680
- ## v0.0.1 (18-04-2023)
681
-
682
- First Release
683
- **Features:-**
684
-
685
- - 'start' command to run react app
686
- - 'build' command to create build for react app
687
- - 'build:lib' command to create lib for react library
688
- - 'build:es' command to create es for react library
689
- - 'templates' command to create es for react library
690
- # Changelog and Release Notes
491
+ Enhanced build:es and build:lib commands to support multiple input folders.
492
+ For eg :- cbt build:es src,assets es,target
691
493
 
692
494
  # v0.0.19 (06-01-2026)
693
495
 
package/README_backup.md CHANGED
@@ -463,220 +463,6 @@ For example
463
463
  - `customAttributes` support for add attributes to html, link , script tag in the output build.
464
464
 
465
465
 
466
- ## v0.0.1 (18-04-2023)
467
-
468
- First Release
469
- **Features:-**
470
-
471
- - 'start' command to run react app
472
- - 'build' command to create build for react app
473
- - 'build:lib' command to create lib for react library
474
- - 'build:es' command to create es for react library
475
- - 'templates' command to create es for react library
476
- # Changelog and Release Notes
477
-
478
- # v0.0.19 (06-01-2026)
479
-
480
- **Feature:-**
481
- - During class name generation, when the template included the file name, it was converted to lowercase by default. Support has now been added to include the file name as class names in a case-insensitive manner.
482
-
483
- ```
484
- css: {
485
- classNameOptions: {
486
- caseOnlyFilename: true
487
- }
488
- }
489
- ```
490
-
491
-
492
- **Adjustments:-**
493
- - issue in CssCustomOrderPlugin has been fixed
494
- - customChunks default pattern for styles is removed (important)
495
-
496
-
497
- # v0.0.18 (23-12-2025)(issue in CssCustomOrderPlugin)
498
-
499
- **Adjustments:-**
500
- - remove the unwanted console in the previous version
501
- - html not creation issue due to the generate html option fixed
502
-
503
- # v0.0.17 (22-12-2025) (html not creation issue) (issue in CssCustomOrderPlugin)
504
-
505
- **revert:-**
506
- - InjectChunkGraphPlugin and the pfc and plc functions were reverted due to UAT issues unrelated to our tool. Consequently, the plugin could not be included in this version. we rewriting the plc and pfc in resource hints plugins recently, it will function correctly when the new plugin is enabled,so revert this changes from this version
507
-
508
-
509
- **Feature:-**
510
- - `alias` support for `build:es` and `build:lib`
511
- - Add babel-plugin-module-resolver dependencies for library only
512
- - Modify getBabelPlugin to include module resolver with aliases
513
- - An additional entry point support has been added.
514
- - An option for HTML generation has been provided.
515
- - Support for CssCustomOrderPlugin has been added.
516
-
517
- **Adjustments:-**
518
- - ChunkHierarchyPlugin.js – modified and rewrite the plugin to get the proper output (this is the stable version of this plugin).
519
-
520
-
521
- # v0.0.16 (05-11-2025) (deprecated)
522
-
523
- **Adjustments:-**
524
- - ChunkHierarchyPlugin.js – Added support for ConcatenatedModule modules.
525
- - InjectChunkGraphPlugin.js – Changed the template name from {{--preload-chunk-graph-object}} to __PRELOAD_CHUNK_GRAPH__ to resolve minification issues.
526
- - Disabled CSS source map generation – CSS source maps were being created when RTL split was disabled and sourceMap was enabled, causing issues. Hence, CSS source map creation has been disabled
527
- - Source map path correction – The resolving paths in source map files appeared as zohodesk-react/./src, which was incompatible with the Murphy tool. Updated it to zohodesk-react/src by adding a function to devtoolModuleFilenameTemplate in the output configuration.
528
- - ChunkHierarchyPlugin – Made it active in development mode as well by removing the “run only in production” condition.
529
-
530
- # v0.0.15 (11-10-2025) (deprecated)
531
-
532
- **Feature:-**
533
- - Chunk Dependency Mapping: Added a new feature that generates a JSON file listing all chunk dependencies in the Webpack build
534
- For example, if main.js is a chunk, the generated JSON will include all of its direct imports (dependencies).
535
- - Purpose:
536
- To provide clear visibility into chunk relationships and dependencies for debugging, optimization, and performance analysis.
537
-
538
- ```
539
- chunkGraph:{
540
- enable: { value: true },
541
- fileName: ''
542
- }
543
- ```
544
-
545
- - Preload Chunk Split Visualization
546
- Enhanced the Preload Chunk (PLC) mechanism to identify and list the sub-chunks generated from a preloaded parent chunk.
547
- When a chunk is configured for preloading (e.g., ticket.js), the system now traces and records all the split chunks associated with it
548
-
549
- rewrite the plc and pfc fucntion in resourceHints plugin and created a new plugin to inject the sub chunks of the preloaded chunks in runtime file
550
-
551
- if resourceHints not enabled plc , pfc and custom function related to this are not created
552
-
553
- ```
554
- resourceHints: {
555
- enable: true,
556
- PreloadChunkNames: [//name of chunks to be preload//]
557
- },
558
- ```
559
-
560
-
561
- # v0.0.14 (06-10-2025)
562
-
563
- **Feature:-**
564
- - Added integrity and crossorigin attributes for all the js and css files in index.html
565
-
566
- ```enableSubResourceIntegrity: true
567
- ```
568
- **Adjustments:-**
569
- - add ts-loader to parse tsx and ts files
570
-
571
- # v0.0.13 (02-09-2025)
572
-
573
- **Adjustments:-**
574
- - Source map files are created in the smap/ folder by default. However, they are also being created in the js/ folder to resolve the issue where Murphy was unable to locate them.
575
-
576
- **Feature:-**
577
- - Added support for Murphy to be built as a separate chunk and injected as the top script in the initial HTML.
578
- - To enable this support , add this in your configuration
579
-
580
- ```murphyBootstrapHtml{
581
- enable: true,
582
- chunkName: '',
583
- filePath: ''
584
- }```
585
-
586
-
587
-
588
- # v0.0.12 (14-08-2025)
589
-
590
- - Fixed the initial i18n loading issue caused by using the same function in both the i18nRuntimeDealer plugin and decidePublicPath
591
-
592
- # v0.0.11 (07-08-2025) (had an issue while enable i18n chunk split plugin)
593
- - remove babel-plugin-module-resolver dependencies
594
-
595
- **Adjustments:-**
596
- - Public Folder configuration is separated for development and production
597
-
598
- **Bug Fix:-**
599
- - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
600
- - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
601
- - Fixed the issue where a space in the variable name causes it to return an undefined value.
602
- - Fixed the URL path generation issue that occurred while using context in the development setup.
603
-
604
-
605
- # v0.0.10 (12-05-2025)
606
- **Feature:-**
607
- - `alias` support for `build:es` and `build:lib`
608
- - Add babel-plugin-module-resolver dependencies
609
- - Modify getBabelPlugin to include module resolver with aliases
610
-
611
- **Bug Fix:-**
612
- - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
613
- - Update mockApiHandler to ensure mock function is called correctly
614
-
615
- **Change:-**
616
- - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
617
-
618
- ## v0.0.9
619
-
620
- **Feature:-**
621
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
622
- - to use externals, we use the following pattern in `app > externals` :
623
-
624
- For example
625
- ```
626
- externals: {
627
- <key> : <value>
628
- }
629
- ```
630
-
631
- ## v0.0.6 (4-09-2023)
632
-
633
- **Feature:-**
634
- - 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`.
635
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
636
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
637
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
638
- - added support for glob pattern for custom chunks split logic.
639
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
640
-
641
- **Change:-**
642
- - i18n name not generated issue fix.
643
- - public path not correctly set issue fix.
644
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
645
- ## v0.0.5 (6-08-2023)
646
-
647
- **Changes:--**
648
- - Typo fix in i18nRuntimeDealerPlugin.js
649
- - fixing some bugs in resolvers.js file
650
-
651
- ## v0.0.3 (1-08-2023)
652
-
653
- **Changes:--**
654
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
655
- - unwanted files deleted from build
656
-
657
- **Issue Fix:--**
658
- - The issue with the source map not being created in the build has been fixed."
659
-
660
-
661
- ## v0.0.2 (28-04-2023)
662
-
663
- **Features:-**
664
-
665
- - `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)
666
- - `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)
667
- - `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.
668
- - `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.
669
- - `enableChunkHash` renamed as `enableFileNameHashing`
670
-
671
- - `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`)
672
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
673
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
674
- - `removePropTypes` support for remove the prop types package in the output build.
675
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
676
- - `manifestJson` default value set as false.
677
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
678
-
679
-
680
466
  ## v0.0.1 (18-04-2023)
681
467
 
682
468
  First Release
@@ -0,0 +1,15 @@
1
+ /* eslint-disable global-require */
2
+ import { existsSync, readdirSync } from 'fs';
3
+ import { join } from 'path';
4
+ const allConfigs = [];
5
+ readdirSync(join(__dirname, 'commands')).forEach(folderName => {
6
+ const modulePath = join(__dirname, `./commands/${folderName}/config.js`);
7
+
8
+ if (existsSync(modulePath)) {
9
+ // eslint-disable-next-line import/no-dynamic-require
10
+ const config = require(modulePath).default;
11
+
12
+ allConfigs.push(config);
13
+ }
14
+ });
15
+ export default allConfigs;
@@ -0,0 +1,6 @@
1
+ import { messageLogger } from "../../logger";
2
+ import webpackBuild from "../../shared/bundler/webpack/webpackBuild";
3
+ export function commandExecutor(options) {
4
+ messageLogger('Build is running.....');
5
+ webpackBuild(options);
6
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ name: 'build',
3
+ alias: ['devbuild'],
4
+ dirname: __dirname
5
+ };
@@ -0,0 +1,25 @@
1
+ import { decidePublicPath, modifiedServerOptions } from "../../shared/bundler/webpack/common/decidePublicPath";
2
+ import { isDevelopmentMode } from "../../shared/bundler/webpack/common/modeUtils";
3
+ import { joinWithAppPath } from "../../shared/constants";
4
+ export function optionsProcessor(options) {
5
+ const {
6
+ context,
7
+ mode,
8
+ noPublicPath
9
+ } = options;
10
+ const {
11
+ isCdnEnabled
12
+ } = options.cdnMapping;
13
+ const serverExtras = modifiedServerOptions(options);
14
+ const publicPath = noPublicPath ? undefined : decidePublicPath(serverExtras);
15
+ const contextFolderPath = joinWithAppPath(context);
16
+ const defaultAppliedOptions = { ...options,
17
+ serverExtras,
18
+ // eslint-disable-next-line no-nested-ternary
19
+ mode: mode === null ? 'prod' : mode === 'dev' ? 'dev' : 'prod',
20
+ publicPath: isDevelopmentMode(mode) || isCdnEnabled ? undefined : publicPath,
21
+ contextFolderPath,
22
+ httpsOptions: serverExtras.httpsOptions
23
+ };
24
+ return defaultAppliedOptions;
25
+ }
@@ -0,0 +1,4 @@
1
+ import { runPreProcess } from "../../shared/pre_process/runPreProcess";
2
+ export function preProcessor(options) {
3
+ runPreProcess(options, 'node');
4
+ }
@@ -0,0 +1,29 @@
1
+ import { joinWithAppPath } from "../../shared/constants";
2
+ import { watchRun } from "../../shared/fileUtils/watchRun";
3
+ export function commandExecutor(options) {
4
+ const {
5
+ extraArgs = []
6
+ } = options;
7
+ const index = extraArgs.indexOf('-w');
8
+ const canWatch = index !== -1;
9
+
10
+ if (canWatch) {
11
+ extraArgs.splice(index, 1);
12
+ }
13
+
14
+ let [srcArg, targetArg] = extraArgs;
15
+ srcArg = srcArg || 'src';
16
+ targetArg = targetArg || 'es';
17
+ const srcList = srcArg.split(',').map(s => joinWithAppPath(s));
18
+ const targetList = targetArg.split(',').map(t => joinWithAppPath(t));
19
+ const runs = Math.min(srcList.length, targetList.length);
20
+ srcList.slice(0, runs).forEach((src, index) => {
21
+ watchRun({
22
+ options,
23
+ src,
24
+ target: targetList[index],
25
+ canWatch,
26
+ mode: 'es'
27
+ });
28
+ });
29
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ name: 'buildEs',
3
+ alias: ['build_es', 'build:es'],
4
+ dirname: __dirname
5
+ };
@@ -0,0 +1,9 @@
1
+ import { runPreProcess } from "../../shared/pre_process/runPreProcess";
2
+ export function preProcessor(options) {
3
+ const {
4
+ extraArgs = []
5
+ } = options;
6
+ const index = extraArgs.indexOf('-w');
7
+ const canWatch = index !== -1;
8
+ runPreProcess(options, canWatch ? 'nodemon' : 'node');
9
+ }
@@ -0,0 +1,24 @@
1
+ import { joinWithAppPath } from "../../shared/constants";
2
+ import { watchRun } from "../../shared/fileUtils/watchRun";
3
+ export function commandExecutor(options) {
4
+ const {
5
+ extraArgs = []
6
+ } = options;
7
+ const index = extraArgs.indexOf('-w');
8
+ const canWatch = index !== -1;
9
+
10
+ if (canWatch) {
11
+ extraArgs.splice(index, 1);
12
+ }
13
+
14
+ let [src, target] = extraArgs;
15
+ src = joinWithAppPath(src || 'src');
16
+ target = joinWithAppPath(target || 'lib');
17
+ watchRun({
18
+ options,
19
+ src,
20
+ target,
21
+ canWatch,
22
+ mode: 'lib'
23
+ });
24
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ name: 'buildLib',
3
+ alias: ['build:lib', 'build_lib'],
4
+ dirname: __dirname
5
+ };
@@ -0,0 +1,9 @@
1
+ import { runPreProcess } from "../../shared/pre_process/runPreProcess";
2
+ export function preProcessor(options) {
3
+ const {
4
+ extraArgs = []
5
+ } = options;
6
+ const index = extraArgs.indexOf('-w');
7
+ const canWatch = index !== -1;
8
+ runPreProcess(options, canWatch ? 'nodemon' : 'node');
9
+ }
@@ -0,0 +1,32 @@
1
+ import { dirname, join } from 'path';
2
+ import { messageLogger, verboseLogger } from "../../logger";
3
+ import { spawnSyncIO } from "../../shared/commands-utils/spawnSyncIO";
4
+ import { joinWithAppPath } from "../../shared/constants";
5
+ export function commandExecutor(options) {
6
+ const {
7
+ extraArgs
8
+ } = options;
9
+ const {
10
+ enable,
11
+ separateSeverPort,
12
+ mockEntryFile,
13
+ disableNodemon
14
+ } = options.mockServer;
15
+
16
+ if (!enable) {
17
+ messageLogger('mock server not enabled');
18
+ return;
19
+ }
20
+
21
+ if (!separateSeverPort) {
22
+ messageLogger('mock server not port enabled');
23
+ return;
24
+ }
25
+
26
+ const absolutePath = join(__dirname, '..', '..', 'shared', 'server', 'mockServer.js');
27
+ const mockFile = joinWithAppPath(mockEntryFile);
28
+ verboseLogger('Mock server is running path', absolutePath);
29
+ verboseLogger('App mock server is path', mockFile);
30
+ messageLogger('mock server is running.....');
31
+ spawnSyncIO(disableNodemon ? 'node' : 'nodemon', [absolutePath, '--watch', dirname(mockFile), ...extraArgs]); // webpackBuild(options);
32
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ name: 'mockServer',
3
+ alias: ['mockserver', 'mock_server', 'mock-server', 'mock:server'],
4
+ dirname: __dirname
5
+ };