@zohodesk/client_build_tool 0.0.22-exp.3 → 0.0.22-exp.5
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/README.md +0 -723
- package/README_backup.md +0 -723
- package/app/README.MD +30 -0
- package/app/es/test.js +47 -0
- package/app/package.json +12 -0
- package/lib/schemas/defaultConfigValues.js +2 -2
- package/lib/schemas/defaultConfigValuesOnly.js +0 -5
- package/lib/shared/babel/babelWebConfig.js +2 -1
- package/lib/shared/bundler/webpack/configCustomLoaders.js +1 -4
- package/lib/shared/bundler/webpack/custom_plugins/BundleIntegrityReport/utils.js +15 -0
- package/lib/shared/bundler/webpack/entryConfig.js +2 -3
- package/lib/shared/bundler/webpack/moduleConcatenationConfig.js +18 -0
- package/lib/shared/bundler/webpack/optimizationConfig.js +4 -9
- package/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +1 -1
- package/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +1 -1
- package/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +1 -1
- package/package.json +1 -1
- package/es/allCommandsConfigs.js +0 -15
- package/es/commands/build/commandExecutor.js +0 -6
- package/es/commands/build/config.js +0 -5
- package/es/commands/build/optionsProcessor.js +0 -25
- package/es/commands/build/preProcessor.js +0 -4
- package/es/commands/buildEs/commandExecutor.js +0 -29
- package/es/commands/buildEs/config.js +0 -5
- package/es/commands/buildEs/preProcessor.js +0 -9
- package/es/commands/buildLib/commandExecutor.js +0 -24
- package/es/commands/buildLib/config.js +0 -5
- package/es/commands/buildLib/preProcessor.js +0 -9
- package/es/commands/mockserver/commandExecutor.js +0 -32
- package/es/commands/mockserver/config.js +0 -5
- package/es/commands/pre_process/commandExecutor.js +0 -10
- package/es/commands/pre_process/config.js +0 -5
- package/es/commands/start/commandExecutor.js +0 -4
- package/es/commands/start/config.js +0 -5
- package/es/commands/start/optionsProcessor.js +0 -21
- package/es/commands/start/preProcessor.js +0 -4
- package/es/commands/template/commandExecutor.js +0 -17
- package/es/commands/template/config.js +0 -5
- package/es/commands/version/commandExecutor.js +0 -5
- package/es/commands/version/config.js +0 -5
- package/es/commandsRouter.js +0 -58
- package/es/index.js +0 -4
- package/es/logger.js +0 -23
- package/es/schemas/applyValuesToSchema/index.js +0 -25
- package/es/schemas/applyValuesToSchema/isObject.js +0 -3
- package/es/schemas/applyValuesToSchema/isValid.js +0 -7
- package/es/schemas/cliArgsToObject.js +0 -32
- package/es/schemas/defaultConfigValues.js +0 -394
- package/es/schemas/defaultConfigValuesOnly.js +0 -196
- package/es/schemas/deprecatedOptionsHandler.js +0 -60
- package/es/schemas/getNpmVersion.js +0 -13
- package/es/schemas/giveDefaultValue.js +0 -11
- package/es/schemas/npmConfigToObject.js +0 -27
- package/es/schemas/readOptions.js +0 -67
- package/es/schemas/readOptionsForConfigFile.js +0 -28
- package/es/shared/babel/addDefaultPlugins.js +0 -8
- package/es/shared/babel/babelWebConfig.js +0 -43
- package/es/shared/babel/babel_plugins/removeAttributesPlugin.js +0 -21
- package/es/shared/babel/getBabelPlugin.js +0 -36
- package/es/shared/babel/runBabelForJSFile.js +0 -15
- package/es/shared/babel/runBabelForTsFile.js +0 -34
- package/es/shared/bundler/webpack/common/decidePublicPath.js +0 -45
- package/es/shared/bundler/webpack/common/libAlias.js +0 -24
- package/es/shared/bundler/webpack/common/modeUtils.js +0 -24
- package/es/shared/bundler/webpack/common/nameTemplates.js +0 -95
- package/es/shared/bundler/webpack/common/resourceBasedPublicPath.js +0 -12
- package/es/shared/bundler/webpack/configCustomLoaders.js +0 -3
- package/es/shared/bundler/webpack/cssLoaders.js +0 -8
- package/es/shared/bundler/webpack/custom_plugins/BundleIntegrityReport/index.js +0 -76
- package/es/shared/bundler/webpack/custom_plugins/CdnChangePlugin/index.js +0 -102
- package/es/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +0 -36
- package/es/shared/bundler/webpack/custom_plugins/ChunkHierarchyPlugin.js +0 -65
- package/es/shared/bundler/webpack/custom_plugins/CssCustomOrderPlugin.js +0 -37
- package/es/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +0 -97
- package/es/shared/bundler/webpack/custom_plugins/EFCTemplatePlugin.js +0 -98
- package/es/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin.js +0 -211
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +0 -11
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nFilesEmitPlugin.js +0 -160
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +0 -66
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nRuntimeDealerPlugin.js +0 -201
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +0 -95
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/LocaleChunkAssetsStore.js +0 -59
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ModulesI18nKeysStore.js +0 -82
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +0 -25
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +0 -13
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -15
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +0 -72
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +0 -23
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/iterateModulesInChunk.js +0 -40
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +0 -59
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -15
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +0 -22
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +0 -35
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +0 -70
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +0 -56
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/getChunkModules.js +0 -6
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +0 -10
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -2
- package/es/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -121
- package/es/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +0 -85
- package/es/shared/bundler/webpack/custom_plugins/InjectChunkGraphPlugin.js +0 -47
- package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +0 -20
- package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +0 -11
- package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +0 -26
- package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/findInitialFileNames.js +0 -11
- package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/index.js +0 -34
- package/es/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/removeHashFromFileName.js +0 -11
- package/es/shared/bundler/webpack/custom_plugins/MurphyInjectorPlugin/index.js +0 -79
- package/es/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -0
- package/es/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +0 -185
- package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +0 -47
- package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +0 -70
- package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +0 -34
- package/es/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +0 -14
- package/es/shared/bundler/webpack/custom_plugins/RuntimeResourceCleanup/index.js +0 -63
- package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/classHandling.js +0 -9
- package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/index.js +0 -63
- package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/selectorWeightPrefixAdder.js +0 -43
- package/es/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/windowsModification.js +0 -7
- package/es/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +0 -104
- package/es/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +0 -6
- package/es/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +0 -74
- package/es/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/addHashToFilePath.js +0 -10
- package/es/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +0 -36
- package/es/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/index.js.js +0 -35
- package/es/shared/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js +0 -52
- package/es/shared/bundler/webpack/custom_plugins/VariableConversionCollector/index.js +0 -341
- package/es/shared/bundler/webpack/custom_plugins/custom_attribute_plugin/index.js +0 -67
- package/es/shared/bundler/webpack/custom_plugins/emitAsset.js +0 -7
- package/es/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +0 -43
- package/es/shared/bundler/webpack/custom_plugins/getInitialI18nAssetsArrayStr.js +0 -79
- package/es/shared/bundler/webpack/defaultVendorPatternList.js +0 -3
- package/es/shared/bundler/webpack/devtoolConfig.js +0 -6
- package/es/shared/bundler/webpack/entryConfig.js +0 -25
- package/es/shared/bundler/webpack/externals.js +0 -10
- package/es/shared/bundler/webpack/getCSSLoaders.js +0 -17
- package/es/shared/bundler/webpack/getFilenameFromModule.js +0 -15
- package/es/shared/bundler/webpack/jsLoaders.js +0 -16
- package/es/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -4
- package/es/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +0 -10
- package/es/shared/bundler/webpack/loaderConfigs/checkIsPatternsMatchFilename.js +0 -45
- package/es/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -11
- package/es/shared/bundler/webpack/loaderConfigs/configPostCssLoader.js +0 -23
- package/es/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -13
- package/es/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -71
- package/es/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +0 -56
- package/es/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +0 -11
- package/es/shared/bundler/webpack/loaderConfigs/i18nIdReplaceLoaderConfig.js +0 -40
- package/es/shared/bundler/webpack/loaders/i18nIdReplaceLoader.js +0 -116
- package/es/shared/bundler/webpack/loaders/miniCssFallBackLoader.js +0 -5
- package/es/shared/bundler/webpack/loaders/workerLoader.js +0 -121
- package/es/shared/bundler/webpack/optimizationConfig.js +0 -42
- package/es/shared/bundler/webpack/outputConfig.js +0 -35
- package/es/shared/bundler/webpack/pluginConfigs/configBundleAnalyzer.js +0 -30
- package/es/shared/bundler/webpack/pluginConfigs/configBundleIntegrityReport.js +0 -27
- package/es/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +0 -17
- package/es/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +0 -16
- package/es/shared/bundler/webpack/pluginConfigs/configChunkHierarchyPlugin.js +0 -10
- package/es/shared/bundler/webpack/pluginConfigs/configCopyPublicFolders.js +0 -50
- package/es/shared/bundler/webpack/pluginConfigs/configCssCustomOrderPlugin.js +0 -8
- package/es/shared/bundler/webpack/pluginConfigs/configCustomAttributesPlugin.js +0 -12
- package/es/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +0 -67
- package/es/shared/bundler/webpack/pluginConfigs/configEFCTemplatePlugin.js +0 -37
- package/es/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -43
- package/es/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +0 -52
- package/es/shared/bundler/webpack/pluginConfigs/configI18nNumericIndexPlugin.js +0 -17
- package/es/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +0 -29
- package/es/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -8
- package/es/shared/bundler/webpack/pluginConfigs/configInjectChunkGraphPlugin.js +0 -12
- package/es/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +0 -36
- package/es/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +0 -13
- package/es/shared/bundler/webpack/pluginConfigs/configMurphyInjectorPlugin.js +0 -19
- package/es/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +0 -18
- package/es/shared/bundler/webpack/pluginConfigs/configResourceHintsPlugin.js +0 -11
- package/es/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -19
- package/es/shared/bundler/webpack/pluginConfigs/configRuntimeResourceCleanup.js +0 -20
- package/es/shared/bundler/webpack/pluginConfigs/configSelectorWeightPlugin.js +0 -18
- package/es/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +0 -29
- package/es/shared/bundler/webpack/pluginConfigs/configSourceMapPlugin.js +0 -12
- package/es/shared/bundler/webpack/pluginConfigs/configTPHashMappingPlugin.js +0 -20
- package/es/shared/bundler/webpack/pluginConfigs/configVariableConversionPlugin.js +0 -15
- package/es/shared/bundler/webpack/plugins.js +0 -33
- package/es/shared/bundler/webpack/resolvers.js +0 -70
- package/es/shared/bundler/webpack/splitChunksConfig.js +0 -106
- package/es/shared/bundler/webpack/statsConfig.js +0 -23
- package/es/shared/bundler/webpack/tsLoaders.js +0 -16
- package/es/shared/bundler/webpack/utils/index.js +0 -8
- package/es/shared/bundler/webpack/utils/object-manipulation.js +0 -82
- package/es/shared/bundler/webpack/utils/updateArrayWithDefault.js +0 -29
- package/es/shared/bundler/webpack/webpackBuild.js +0 -14
- package/es/shared/bundler/webpack/webpackConfig.js +0 -35
- package/es/shared/commands-utils/doBasicRequirementCheck.js +0 -10
- package/es/shared/commands-utils/getCliPath.js +0 -28
- package/es/shared/commands-utils/index.js +0 -3
- package/es/shared/commands-utils/log.js +0 -4
- package/es/shared/commands-utils/readArgsFormCommandLine.js +0 -4
- package/es/shared/commands-utils/readOptionFormCommandLine.js +0 -4
- package/es/shared/commands-utils/spawnSyncIO.js +0 -24
- package/es/shared/constants.js +0 -22
- package/es/shared/fileUtils/copyFile.js +0 -23
- package/es/shared/fileUtils/directoryIterator.js +0 -12
- package/es/shared/fileUtils/watchRun.js +0 -96
- package/es/shared/postcss/custom_postcss_plugins/EmptyPlugin.js +0 -18
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/constants.js +0 -2
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js +0 -58
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/index.js +0 -122
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/insertBefore.js +0 -22
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js +0 -11
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js +0 -13
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js +0 -17
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/specialCases.js +0 -32
- package/es/shared/postcss/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js +0 -28
- package/es/shared/postcss/custom_postcss_plugins/RTLSplitPlugin.js +0 -125
- package/es/shared/postcss/custom_postcss_plugins/SelectorReplace.js +0 -82
- package/es/shared/postcss/custom_postcss_plugins/ValueReplacer.js +0 -50
- package/es/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +0 -318
- package/es/shared/postcss/filterPluginsAllowedForSpecficFile.js +0 -41
- package/es/shared/postcss/getAllowedPostCssPlugins.js +0 -20
- package/es/shared/postcss/getSpecificPostCssPlugin.js +0 -38
- package/es/shared/postcss/runPostCssForCssFile.js +0 -25
- package/es/shared/pre_process/runPreProcess.js +0 -47
- package/es/shared/server/configWebpackDevMiddleware.js +0 -26
- package/es/shared/server/corsHandling.js +0 -23
- package/es/shared/server/getIp.js +0 -18
- package/es/shared/server/getServerURL.js +0 -28
- package/es/shared/server/httpsOptions.js +0 -36
- package/es/shared/server/initExpressApp.js +0 -9
- package/es/shared/server/initialHTMLHandling.js +0 -92
- package/es/shared/server/mockApiHandler.js +0 -53
- package/es/shared/server/mockServer.js +0 -34
- package/es/shared/server/serveContextFiles.js +0 -17
- package/es/shared/server/serverBywebpackDevMiddleware.js +0 -21
- package/es/shared/server/startHttpServer.js +0 -18
- package/es/shared/server/startHttpsServer.js +0 -26
- package/es/shared/server/unwanted/addHttp2Server.js +0 -32
- package/es/shared/server/unwanted/configWebpackDevMiddleware.js +0 -35
- package/es/shared/server/unwanted/mockApiSupport.js +0 -11
- package/es/shared/server/unwanted/websocketMockSetup.js +0 -36
- package/es/shared/server/urlConcat.js +0 -35
- package/es/shared/utils/requireLocalOrGlobal.js +0 -57
- package/es/shared/utils/utils.js +0 -0
- package/es/shared/utils/versionPrint.js +0 -9
package/app/README.MD
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Welcome
|
|
2
|
+
|
|
3
|
+
This is a web applications template.
|
|
4
|
+
|
|
5
|
+
Supported and Tested Environment
|
|
6
|
+
|
|
7
|
+
| Name | Version |
|
|
8
|
+
| :--: | :------: |
|
|
9
|
+
| node | v18.11.0 |
|
|
10
|
+
| npm | 8.19.2 |
|
|
11
|
+
|
|
12
|
+
OS : Mac , ubuntu
|
|
13
|
+
|
|
14
|
+
So Please make sure you use the right node and npm version
|
|
15
|
+
|
|
16
|
+
## To install your app
|
|
17
|
+
|
|
18
|
+
> `npm install`
|
|
19
|
+
|
|
20
|
+
## To run app
|
|
21
|
+
|
|
22
|
+
> `npm run start`
|
|
23
|
+
|
|
24
|
+
## To create build
|
|
25
|
+
|
|
26
|
+
> `npm run build`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
Happy Code :>) 🤟
|
package/app/es/test.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function destructuring_within_body() {
|
|
2
|
+
const {
|
|
3
|
+
jos: joshuva = 'josss'
|
|
4
|
+
} = {
|
|
5
|
+
jos: 'dkdk'
|
|
6
|
+
};
|
|
7
|
+
const object = {
|
|
8
|
+
a: 'Joshuva',
|
|
9
|
+
b: {
|
|
10
|
+
age: 30,
|
|
11
|
+
hobbies: ['chess', 'book_reading']
|
|
12
|
+
},
|
|
13
|
+
c: ['jos']
|
|
14
|
+
};
|
|
15
|
+
const {
|
|
16
|
+
a,
|
|
17
|
+
c: j,
|
|
18
|
+
...d
|
|
19
|
+
} = object;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function destructuring_within_args({
|
|
23
|
+
va: jso
|
|
24
|
+
}) {
|
|
25
|
+
console.log('jso', jso);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function destructuring_within_args_arr([jos, joshuv]) {
|
|
29
|
+
console.log('array destructing', jos, joshuv);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function destructuring_within_args_with_default_value({
|
|
33
|
+
jos: joss
|
|
34
|
+
} = {}) {
|
|
35
|
+
console.log('josss', joss);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function restFromargs(...a) {
|
|
39
|
+
console.log('a', a);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function default_assignment(a = 1, b = 2) {
|
|
43
|
+
console.log('a', a);
|
|
44
|
+
console.log('b', b);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function default_assignment_with_arr([j, q] = []) {}
|
package/app/package.json
ADDED
|
@@ -26,7 +26,8 @@ var _default = {
|
|
|
26
26
|
},
|
|
27
27
|
fileName: null,
|
|
28
28
|
options: null,
|
|
29
|
-
excludeKeys: null
|
|
29
|
+
excludeKeys: null,
|
|
30
|
+
moduleConcatenation: true
|
|
30
31
|
},
|
|
31
32
|
enableFileNameHashing: {
|
|
32
33
|
value: false,
|
|
@@ -320,7 +321,6 @@ var _default = {
|
|
|
320
321
|
licenseManifest: false
|
|
321
322
|
},
|
|
322
323
|
changeRuntimeChunkChar: '~',
|
|
323
|
-
splitRuntimeChunk: true,
|
|
324
324
|
serviceWorker: {
|
|
325
325
|
enable: false,
|
|
326
326
|
templateFilePath: 'sw.js',
|
|
@@ -120,7 +120,6 @@ var _default = {
|
|
|
120
120
|
},
|
|
121
121
|
app: {
|
|
122
122
|
entryFile: 'src/index.js',
|
|
123
|
-
entryPointName: 'main',
|
|
124
123
|
tpFolder: null,
|
|
125
124
|
moduleResolvePath: 'node_modules'
|
|
126
125
|
},
|
|
@@ -190,7 +189,6 @@ var _default = {
|
|
|
190
189
|
enable: true
|
|
191
190
|
},
|
|
192
191
|
changeRuntimeChunkChar: '~',
|
|
193
|
-
splitRuntimeChunk: true,
|
|
194
192
|
serviceWorker: {
|
|
195
193
|
enable: false,
|
|
196
194
|
templateFilePath: 'sw.js',
|
|
@@ -202,9 +200,6 @@ var _default = {
|
|
|
202
200
|
fileName: null,
|
|
203
201
|
options: null,
|
|
204
202
|
excludeKeys: null
|
|
205
|
-
},
|
|
206
|
-
optimization: {
|
|
207
|
-
enable: true
|
|
208
203
|
}
|
|
209
204
|
};
|
|
210
205
|
exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getModuleConcatenationFlag = getModuleConcatenationFlag;
|
|
7
|
+
exports.isStatsEnabled = isStatsEnabled;
|
|
8
|
+
|
|
9
|
+
function getModuleConcatenationFlag(options) {
|
|
10
|
+
return options.stats.moduleConcatenation;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function isStatsEnabled(options) {
|
|
14
|
+
return options.stats.enable;
|
|
15
|
+
}
|
|
@@ -15,11 +15,10 @@ function entryConfig(options) {
|
|
|
15
15
|
} = options.efc;
|
|
16
16
|
const {
|
|
17
17
|
entryFile: mainEntry,
|
|
18
|
-
AdditionalEntry
|
|
19
|
-
entryPointName: mainEntryPointName = 'main'
|
|
18
|
+
AdditionalEntry
|
|
20
19
|
} = options.app;
|
|
21
20
|
const entry = {
|
|
22
|
-
|
|
21
|
+
main: (0, _constants.joinWithAppPath)(mainEntry)
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
if (hasEFC && entryFile) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getModuleConcatenation = getModuleConcatenation;
|
|
7
|
+
|
|
8
|
+
var _modeUtils = require("./common/modeUtils");
|
|
9
|
+
|
|
10
|
+
var _utils = require("./custom_plugins/BundleIntegrityReport/utils");
|
|
11
|
+
|
|
12
|
+
function getModuleConcatenation(options) {
|
|
13
|
+
const mode = (0, _modeUtils.getWebpackMode)(options);
|
|
14
|
+
|
|
15
|
+
if ((0, _modeUtils.isProductionMode)(mode) && (0, _utils.isStatsEnabled)(options)) {
|
|
16
|
+
return (0, _utils.getModuleConcatenationFlag)(options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -15,17 +15,11 @@ var _configCSSMinifierPlugin = require("./pluginConfigs/configCSSMinifierPlugin"
|
|
|
15
15
|
|
|
16
16
|
var _splitChunksConfig = require("./splitChunksConfig");
|
|
17
17
|
|
|
18
|
+
var _moduleConcatenationConfig = require("./moduleConcatenationConfig");
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
function optimizationConfig(options) {
|
|
21
|
-
if (!options.optimization.enable) {
|
|
22
|
-
return {
|
|
23
|
-
minimize: false,
|
|
24
|
-
splitChunks: false,
|
|
25
|
-
runtimeChunk: false
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
23
|
const {
|
|
30
24
|
changeRuntimeChunkChar
|
|
31
25
|
} = options;
|
|
@@ -59,6 +53,7 @@ function optimizationConfig(options) {
|
|
|
59
53
|
moduleIds: 'named',
|
|
60
54
|
runtimeChunk: {
|
|
61
55
|
name: entrypoint => `runtime${char}${entrypoint.name}${suffix}`
|
|
62
|
-
}
|
|
56
|
+
},
|
|
57
|
+
concatenateModules: (0, _moduleConcatenationConfig.getModuleConcatenation)(options)
|
|
63
58
|
};
|
|
64
59
|
}
|
|
@@ -33,7 +33,7 @@ function configHtmlWebpackPlugin(options) {
|
|
|
33
33
|
const minifyHtmlOptions = (0, _modeUtils.isProductionMode)(mode) ? // eslint-disable-next-line no-use-before-define
|
|
34
34
|
getHTMLMinifyOptions(htmlTemplate) : false;
|
|
35
35
|
return new _InitialHtmlPlugin.InitialHtmlPlugin({
|
|
36
|
-
mainChunkName:
|
|
36
|
+
mainChunkName: 'main',
|
|
37
37
|
filename: (0, _nameTemplates.nameTemplates)('html', options),
|
|
38
38
|
template: appInitialHTMLTemplatePath,
|
|
39
39
|
minify: minifyHtmlOptions,
|
|
@@ -25,7 +25,7 @@ function configI18nSplitPlugin(options) {
|
|
|
25
25
|
const i18nPublicPath = (0, _resourceBasedPublicPath.resourceBasedPublicPath)('i18n', options); // const i18nPublicPathAsExpression = publicPathAsExpression('i18n', options);
|
|
26
26
|
|
|
27
27
|
return new _I18nSplitPlugin.default({
|
|
28
|
-
mainChunkName:
|
|
28
|
+
mainChunkName: 'main',
|
|
29
29
|
jsResource: i18nChunkSplit.jsResource,
|
|
30
30
|
localeVarName: i18nChunkSplit.localeVarName,
|
|
31
31
|
jsonpFunc: i18nChunkSplit.jsonpFunc,
|
package/package.json
CHANGED
package/es/allCommandsConfigs.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { runPreProcess } from "../../shared/pre_process/runPreProcess";
|
|
2
|
-
export function commandExecutor(options) {
|
|
3
|
-
const {
|
|
4
|
-
extraArgs = []
|
|
5
|
-
} = options;
|
|
6
|
-
const index = extraArgs.indexOf('-w');
|
|
7
|
-
const canWatch = index !== -1;
|
|
8
|
-
const result = runPreProcess(options, canWatch ? 'nodemon' : 'node');
|
|
9
|
-
!canWatch && process.exit(result ? result.status : 0);
|
|
10
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { decidePublicPath, modifiedServerOptions } from "../../shared/bundler/webpack/common/decidePublicPath";
|
|
2
|
-
import { joinWithAppPath } from "../../shared/constants";
|
|
3
|
-
export function optionsProcessor(options) {
|
|
4
|
-
const {
|
|
5
|
-
context,
|
|
6
|
-
mode,
|
|
7
|
-
noPublicPath
|
|
8
|
-
} = options;
|
|
9
|
-
const serverExtras = modifiedServerOptions(options);
|
|
10
|
-
const publicPath = noPublicPath ? undefined : decidePublicPath(serverExtras);
|
|
11
|
-
const contextFolderPath = joinWithAppPath(context);
|
|
12
|
-
const defaultAppliedOptions = { ...options,
|
|
13
|
-
// eslint-disable-next-line no-nested-ternary
|
|
14
|
-
mode: options.mode === null ? 'dev' : mode === 'prod' ? 'prod' : 'dev',
|
|
15
|
-
serverExtras,
|
|
16
|
-
publicPath,
|
|
17
|
-
contextFolderPath,
|
|
18
|
-
httpsOptions: serverExtras.httpsOptions
|
|
19
|
-
};
|
|
20
|
-
return defaultAppliedOptions;
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getTemplatePath } from "../../shared/constants";
|
|
2
|
-
import { messageLogger } from "../../logger";
|
|
3
|
-
import { spawnSyncIO } from "../../shared/commands-utils/spawnSyncIO";
|
|
4
|
-
const supportedTemplates = ['app', 'library'];
|
|
5
|
-
export function commandExecutor(options) {
|
|
6
|
-
const {
|
|
7
|
-
extraArgs = []
|
|
8
|
-
} = options;
|
|
9
|
-
const [templateName, ...args] = extraArgs;
|
|
10
|
-
|
|
11
|
-
if (!supportedTemplates.includes(templateName)) {
|
|
12
|
-
messageLogger(`template not supported "${templateName}" only these \n${supportedTemplates.join('\n ')} are supported`);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
spawnSyncIO('cp', ['-r', getTemplatePath(templateName)].concat(args));
|
|
17
|
-
}
|
package/es/commandsRouter.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
import allCommandsConfigs from "./allCommandsConfigs";
|
|
4
|
-
import { errorLogger, verboseLogger, warnLogger } from "./logger";
|
|
5
|
-
import { getOptions } from "./schemas/readOptions";
|
|
6
|
-
export function runCommand(commandName, options) {
|
|
7
|
-
// eslint-disable-next-line no-use-before-define
|
|
8
|
-
const commandConfig = findCommandConfig(commandName);
|
|
9
|
-
|
|
10
|
-
if (!commandConfig) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
dirname
|
|
16
|
-
} = commandConfig;
|
|
17
|
-
|
|
18
|
-
function runRespectiveFile(name, data) {
|
|
19
|
-
const commandExecutorPath = join(dirname, `${name}.js`);
|
|
20
|
-
|
|
21
|
-
if (existsSync(commandExecutorPath)) {
|
|
22
|
-
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
23
|
-
const commandExecutor = require(commandExecutorPath);
|
|
24
|
-
|
|
25
|
-
return (commandExecutor[name] || commandExecutor.default)(data);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
verboseLogger('file not found', commandExecutorPath);
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const processedOption = runRespectiveFile('optionsProcessor', options) || options;
|
|
33
|
-
runRespectiveFile('deprecationHandler', processedOption); // runRespectiveFile("errorHandler", () => {
|
|
34
|
-
|
|
35
|
-
runRespectiveFile('preProcessor', processedOption);
|
|
36
|
-
runRespectiveFile('commandExecutor', processedOption);
|
|
37
|
-
runRespectiveFile('postProcessor', processedOption); // });
|
|
38
|
-
}
|
|
39
|
-
export function route(commandName) {
|
|
40
|
-
try {
|
|
41
|
-
const options = getOptions();
|
|
42
|
-
runCommand(commandName, options);
|
|
43
|
-
} catch (error) {
|
|
44
|
-
errorLogger(error);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function findCommandConfig(option) {
|
|
49
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
50
|
-
for (const commandConfig of allCommandsConfigs) {
|
|
51
|
-
if (commandConfig.name === option || commandConfig.alias.includes(option)) {
|
|
52
|
-
return commandConfig;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
warnLogger('Un known command', option, 'please check the document');
|
|
57
|
-
return null;
|
|
58
|
-
}
|
package/es/index.js
DELETED
package/es/logger.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
export function verboseLogger() {
|
|
3
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4
|
-
args[_key] = arguments[_key];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// TODO: need to be remove when publish happens
|
|
8
|
-
process.env.VERBOSE === 'true' && console.log('\x1b[33m [verbose] \x1b[0m', ...args);
|
|
9
|
-
}
|
|
10
|
-
export function warnLogger() {
|
|
11
|
-
console.warn(...arguments);
|
|
12
|
-
}
|
|
13
|
-
export function messageLogger() {
|
|
14
|
-
console.log(...arguments);
|
|
15
|
-
}
|
|
16
|
-
export function debugLogger() {
|
|
17
|
-
// TODO: need to be remove when publish happens
|
|
18
|
-
console.trace();
|
|
19
|
-
console.log(...arguments);
|
|
20
|
-
}
|
|
21
|
-
export function errorLogger() {
|
|
22
|
-
console.error(...arguments);
|
|
23
|
-
}
|