@zohodesk/react-cli 1.1.19-exp.3 → 1.1.19-exp.4
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/configs/webpack.prod.config.js +2 -2
- package/lib/loaderUtils/getDevJsLoaders.js +2 -2
- package/lib/loaders/workerLoader.js +24 -39
- package/lib/pluginUtils/configHtmlWebpackPlugins.js +2 -9
- package/lib/pluginUtils/getDevPlugins.js +2 -4
- package/lib/pluginUtils/getProdPlugins.js +1 -3
- package/lib/schemas/index.js +1 -2
- package/npm-shrinkwrap.json +55 -19082
- package/package.json +4 -1
- package/packages/client_build_tool/lib/allCommandsConfigs.js +0 -23
- package/packages/client_build_tool/lib/buildToolLoggers.js +0 -32
- package/packages/client_build_tool/lib/commands/build/commandExecutor.js +0 -21
- package/packages/client_build_tool/lib/commands/build/config.js +0 -12
- package/packages/client_build_tool/lib/commands/build/errorHander.js +0 -10
- package/packages/client_build_tool/lib/commands/build/index.js +0 -35
- package/packages/client_build_tool/lib/commands/build/optionsProcesser.js +0 -40
- package/packages/client_build_tool/lib/commands/buildEs/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildEs/config.js +0 -12
- package/packages/client_build_tool/lib/commands/buildLib/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildLib/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/commandExecutor.js +0 -13
- package/packages/client_build_tool/lib/commands/start/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/deprecationHandler.js +0 -10
- package/packages/client_build_tool/lib/commands/start/errorHander.js +0 -10
- package/packages/client_build_tool/lib/commands/start/optionsProcesser.js +0 -36
- package/packages/client_build_tool/lib/commands/start/postProcesser.js +0 -10
- package/packages/client_build_tool/lib/commands/start/preProcesser.js +0 -10
- package/packages/client_build_tool/lib/commandsRouter.js +0 -71
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -44
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/libAlias.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/nameTemplates.js +0 -51
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/cssLoaders.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin.js +0 -111
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/EFCPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +0 -11
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +0 -136
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +0 -95
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +0 -25
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nDependency.js +0 -99
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +0 -81
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nModule.js +0 -201
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +0 -401
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +0 -67
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +0 -77
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -127
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +0 -89
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +0 -15
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +0 -155
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/ExcludePlugin.js +0 -58
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/RTLSplitPlugin.js +0 -139
- package/packages/client_build_tool/lib/shared/bundler/webpack/devServerConfig.js +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/getCSSLoaders.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/jsLoaders.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -14
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -138
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +0 -83
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/workerLoader.js +0 -133
- package/packages/client_build_tool/lib/shared/bundler/webpack/optimizationConfig.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/outputConfig.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCopyThirdpartyFile.js +0 -38
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +0 -35
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configUglifyCSSPlugin.js +0 -15
- package/packages/client_build_tool/lib/shared/bundler/webpack/plugins.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/postcssPlugins.js +0 -36
- package/packages/client_build_tool/lib/shared/bundler/webpack/resolvers.js +0 -42
- package/packages/client_build_tool/lib/shared/bundler/webpack/splitChunksConfig.js +0 -12
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpack.dev.config.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackBuild.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackConfig.js +0 -50
- package/packages/client_build_tool/lib/shared/commands-utlis/doBasicRequiermentCheck.js +0 -16
- package/packages/client_build_tool/lib/shared/commands-utlis/getCliPath.js +0 -38
- package/packages/client_build_tool/lib/shared/commands-utlis/index.js +0 -29
- package/packages/client_build_tool/lib/shared/commands-utlis/log.js +0 -13
- package/packages/client_build_tool/lib/shared/commands-utlis/readArgsFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utlis/readOptionFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utlis/spanSync.js +0 -35
- package/packages/client_build_tool/lib/shared/constants.js +0 -33
- package/packages/client_build_tool/lib/shared/schemas/applyValuesToShema.js +0 -37
- package/packages/client_build_tool/lib/shared/schemas/cliArgsToObject.js +0 -37
- package/packages/client_build_tool/lib/shared/schemas/defaultConfigValues.js +0 -119
- package/packages/client_build_tool/lib/shared/schemas/deprecatedOptionsHandler.js +0 -65
- package/packages/client_build_tool/lib/shared/schemas/getCWD.js +0 -23
- package/packages/client_build_tool/lib/shared/schemas/getNpmVersion.js +0 -21
- package/packages/client_build_tool/lib/shared/schemas/npmConfigToObject.js +0 -32
- package/packages/client_build_tool/lib/shared/schemas/oldDefaultConfigValues.js +0 -480
- package/packages/client_build_tool/lib/shared/schemas/readOptions.js +0 -55
- package/packages/client_build_tool/lib/shared/schemas/readOptionsForPackageJson.js +0 -26
- package/packages/client_build_tool/lib/shared/schemas/readOptionsOld.js +0 -152
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.crt +0 -37
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.key +0 -27
- package/packages/client_build_tool/lib/shared/server/configWebpackDevMiddleware.js +0 -40
- package/packages/client_build_tool/lib/shared/server/corsHandleing.js +0 -28
- package/packages/client_build_tool/lib/shared/server/getIp.js +0 -30
- package/packages/client_build_tool/lib/shared/server/getServerURL.js +0 -29
- package/packages/client_build_tool/lib/shared/server/httpsOptions.js +0 -53
- package/packages/client_build_tool/lib/shared/server/initExpressApp.js +0 -19
- package/packages/client_build_tool/lib/shared/server/initialHTMLHandling.js +0 -66
- package/packages/client_build_tool/lib/shared/server/serveContextFiles.js +0 -24
- package/packages/client_build_tool/lib/shared/server/serverBywebpackDevMiddleware.js +0 -40
- package/packages/client_build_tool/lib/shared/server/startHttpServer.js +0 -26
- package/packages/client_build_tool/lib/shared/server/startHttpsServer.js +0 -34
- package/packages/client_build_tool/lib/shared/server/unwanted/addHttp2Server.js +0 -41
- package/packages/client_build_tool/lib/shared/server/unwanted/configWebpackDevMiddleware.js +0 -44
- package/packages/client_build_tool/lib/shared/server/unwanted/devServerUtlis.js +0 -1
- package/packages/client_build_tool/lib/shared/server/unwanted/mockApiSupport.js +0 -19
- package/packages/client_build_tool/lib/shared/server/unwanted/webpackConfig.js +0 -32
- package/packages/client_build_tool/lib/shared/server/unwanted/websocketMockSetup.js +0 -48
- package/packages/client_build_tool/lib/shared/server/urlConcat.js +0 -25
- package/packages/client_build_tool/lib/shared/utils/utils.js +0 -1
- package/packages/client_build_tool/node_modules/history/CHANGES.md +0 -395
- package/packages/client_build_tool/node_modules/history/DOMUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/ExecutionEnvironment.js +0 -3
- package/packages/client_build_tool/node_modules/history/LICENSE +0 -21
- package/packages/client_build_tool/node_modules/history/LocationUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/PathUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/README.md +0 -282
- package/packages/client_build_tool/node_modules/history/cjs/history.js +0 -933
- package/packages/client_build_tool/node_modules/history/cjs/history.min.js +0 -1
- package/packages/client_build_tool/node_modules/history/createBrowserHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createHashHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createMemoryHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createTransitionManager.js +0 -3
- package/packages/client_build_tool/node_modules/history/es/DOMUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/ExecutionEnvironment.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/LocationUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/PathUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createBrowserHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createHashHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createMemoryHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createTransitionManager.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/warnAboutDeprecatedESMImport.js +0 -35
- package/packages/client_build_tool/node_modules/history/esm/history.js +0 -904
- package/packages/client_build_tool/node_modules/history/index.js +0 -7
- package/packages/client_build_tool/node_modules/history/package.json +0 -117
- package/packages/client_build_tool/node_modules/history/umd/history.js +0 -1059
- package/packages/client_build_tool/node_modules/history/umd/history.min.js +0 -1
- package/packages/client_build_tool/node_modules/history/warnAboutDeprecatedCJSRequire.js +0 -35
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.configServiceWorkerPlugin = configServiceWorkerPlugin;
|
7
|
-
|
8
|
-
var _ServiceWorkerPlugin = _interopRequireDefault(require("../custom_plugins/ServiceWorkerPlugin"));
|
9
|
-
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
|
-
function configServiceWorkerPlugin(options) {
|
13
|
-
const {
|
14
|
-
serviceWorker
|
15
|
-
} = options.app;
|
16
|
-
console.log(serviceWorker);
|
17
|
-
return new _ServiceWorkerPlugin.default(serviceWorker);
|
18
|
-
}
|
package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configUglifyCSSPlugin.js
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.configUglifyCSSPlugin = configUglifyCSSPlugin;
|
7
|
-
|
8
|
-
var _UglifyCSSPlugin = _interopRequireDefault(require("../custom_plugins/UglifyCSSPlugin"));
|
9
|
-
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
|
-
// eslint-disable-next-line no-unused-vars
|
13
|
-
function configUglifyCSSPlugin(options) {
|
14
|
-
return new _UglifyCSSPlugin.default();
|
15
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.plugins = plugins;
|
7
|
-
|
8
|
-
var _configHtmlWebpackPlugin = require("./pluginConfigs/configHtmlWebpackPlugin");
|
9
|
-
|
10
|
-
var _configEnvVariables = require("./pluginConfigs/configEnvVariables");
|
11
|
-
|
12
|
-
var _configI18nSplitPlugin = require("./pluginConfigs/configI18nSplitPlugin");
|
13
|
-
|
14
|
-
var _configMiniCSSExtractPlugin = require("./pluginConfigs/configMiniCSSExtractPlugin");
|
15
|
-
|
16
|
-
var _configRtlCssPlugin = require("./pluginConfigs/configRtlCssPlugin");
|
17
|
-
|
18
|
-
var _configCopyThirdpartyFile = require("./pluginConfigs/configCopyThirdpartyFile");
|
19
|
-
|
20
|
-
var _configIgnorePlugin = require("./pluginConfigs/configIgnorePlugin");
|
21
|
-
|
22
|
-
var _configUglifyCSSPlugin = require("./pluginConfigs/configUglifyCSSPlugin");
|
23
|
-
|
24
|
-
var _configCdnChangePlugin = require("./pluginConfigs/configCdnChangePlugin");
|
25
|
-
|
26
|
-
var _configServiceWorkerPlugin = require("./pluginConfigs/configServiceWorkerPlugin");
|
27
|
-
|
28
|
-
var _configProgressPlugin = require("./pluginConfigs/configProgressPlugin");
|
29
|
-
|
30
|
-
// import { IgnorePlugin } from 'webpack';
|
31
|
-
function plugins(options) {
|
32
|
-
const {
|
33
|
-
i18nChunkSplit
|
34
|
-
} = options;
|
35
|
-
const {
|
36
|
-
rtlSplit
|
37
|
-
} = options.css.plugins;
|
38
|
-
return [(0, _configEnvVariables.configEnvVariables)(options), (0, _configIgnorePlugin.configIgnorePlugin)(options), (0, _configCopyThirdpartyFile.configCopyThirdpartyFile)(options), (0, _configMiniCSSExtractPlugin.configMiniCSSExtractPlugin)(options), i18nChunkSplit.chunkSplitEnable && (0, _configI18nSplitPlugin.configI18nSplitPlugin)(options), rtlSplit.enableRTLSplit && (0, _configRtlCssPlugin.configRtlCssPlugin)(options), (0, _configUglifyCSSPlugin.configUglifyCSSPlugin)(options), (0, _configHtmlWebpackPlugin.configHtmlWebpackPlugin)(options), (0, _configCdnChangePlugin.configCdnChangePlugin)(options), (0, _configServiceWorkerPlugin.configServiceWorkerPlugin)(options), (0, _configProgressPlugin.configProgressPlugin)(options)].filter(Boolean);
|
39
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.postcssPlugins = postcssPlugins;
|
7
|
-
|
8
|
-
var _postcssRtl = _interopRequireDefault(require("postcss-rtl"));
|
9
|
-
|
10
|
-
var _postcssSelectorReplace = _interopRequireDefault(require("postcss-selector-replace"));
|
11
|
-
|
12
|
-
var _ExcludePlugin = require("./custom_postcss_loaders/ExcludePlugin");
|
13
|
-
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
-
|
16
|
-
// import CheckPlugin from './custom_postcss_loaders/CheckPlugin';
|
17
|
-
// console.log({ postcssRTLPlugin });
|
18
|
-
function postcssPlugins(options) {
|
19
|
-
const {
|
20
|
-
plugins,
|
21
|
-
selectorReplace
|
22
|
-
} = options.css;
|
23
|
-
return [selectorReplace && (0, _postcssSelectorReplace.default)(selectorReplace), ...(0, _ExcludePlugin.excludeEmptyCheckPlugin)({
|
24
|
-
enable: plugins.rtl.enable,
|
25
|
-
exclude: plugins.rtl.exclude,
|
26
|
-
plugins: [(0, _postcssRtl.default)({
|
27
|
-
addPrefixToSelector: function addPrefixToSelector(selector, prefix) {
|
28
|
-
if (prefix === '[dir]') {
|
29
|
-
return selector;
|
30
|
-
}
|
31
|
-
|
32
|
-
return `${prefix} ${selector}`; // Make selectors like [dir=rtl] > .selector
|
33
|
-
}
|
34
|
-
})]
|
35
|
-
})].filter(Boolean);
|
36
|
-
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.loaderResolver = loaderResolver;
|
7
|
-
exports.moduleResolver = moduleResolver;
|
8
|
-
|
9
|
-
var _client_packages_group = require("@zohodesk/client_packages_group");
|
10
|
-
|
11
|
-
var _constants = require("../../constants");
|
12
|
-
|
13
|
-
var _libAlias = require("./common/libAlias");
|
14
|
-
|
15
|
-
function moduleResolver(options) {
|
16
|
-
const {
|
17
|
-
moduleResolvePath,
|
18
|
-
disableES5Transpile
|
19
|
-
} = options.app;
|
20
|
-
const nodeModulesPath = moduleResolvePath // eslint-disable-next-line import/no-dynamic-require, global-require
|
21
|
-
? require(require.resolve(moduleResolvePath, {
|
22
|
-
paths: [options.cwd]
|
23
|
-
})).nodeModulesPath : _client_packages_group.nodeModulesPath; // const {unstableDepsInverse} = options;
|
24
|
-
// console.log({ nodeModulesPath });
|
25
|
-
|
26
|
-
return {
|
27
|
-
modules: [_constants.cliNodemodulesPath, nodeModulesPath, 'node_modules'].filter(Boolean),
|
28
|
-
alias: disableES5Transpile ? _libAlias.libAlias : {} // alias: { ...libAlias, ...clientDependenies }
|
29
|
-
|
30
|
-
};
|
31
|
-
}
|
32
|
-
|
33
|
-
function loaderResolver(options) {
|
34
|
-
// const unstableDepsInverse = false;
|
35
|
-
const {
|
36
|
-
unstableDepsInverse
|
37
|
-
} = options;
|
38
|
-
return {
|
39
|
-
modules: unstableDepsInverse ? ['node_modules', _constants.cliNodemodulesPath] : [_constants.cliNodemodulesPath, 'node_modules'] // alias: libAlias
|
40
|
-
|
41
|
-
};
|
42
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _readOptions = require("../../schemas/readOptions");
|
9
|
-
|
10
|
-
var _webpackConfig = _interopRequireDefault(require("./webpackConfig"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
const options = (0, _readOptions.getOptions)();
|
15
|
-
const config = (0, _webpackConfig.default)(options);
|
16
|
-
var _default = config;
|
17
|
-
exports.default = _default;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = webpackBuild;
|
7
|
-
|
8
|
-
var _webpack = require("webpack");
|
9
|
-
|
10
|
-
var _webpackConfig = _interopRequireDefault(require("./webpackConfig"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
function webpackBuild(options) {
|
15
|
-
const config = (0, _webpackConfig.default)(options);
|
16
|
-
console.log('webpackBuild');
|
17
|
-
(0, _webpack.webpack)(config, (err, stats) => {
|
18
|
-
if (err || stats.hasErrors()) {
|
19
|
-
// ...
|
20
|
-
console.log('err', err);
|
21
|
-
} // Done processing
|
22
|
-
|
23
|
-
});
|
24
|
-
}
|
@@ -1,50 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = webpackConfigCreator;
|
7
|
-
|
8
|
-
var _outputConfig = require("./outputConfig");
|
9
|
-
|
10
|
-
var _jsLoaders = require("./jsLoaders");
|
11
|
-
|
12
|
-
var _cssLoaders = require("./cssLoaders");
|
13
|
-
|
14
|
-
var _assetLoaders = require("./loaderConfigs/assetLoaders");
|
15
|
-
|
16
|
-
var _plugins = require("./plugins");
|
17
|
-
|
18
|
-
var _resolvers = require("./resolvers");
|
19
|
-
|
20
|
-
var _optimizationConfig = require("./optimizationConfig");
|
21
|
-
|
22
|
-
var _configHtmlTemplateLoader = require("./loaderConfigs/configHtmlTemplateLoader");
|
23
|
-
|
24
|
-
var _configWebWorkerLoader = require("./loaderConfigs/configWebWorkerLoader");
|
25
|
-
|
26
|
-
// import { devServerConfig } from './devServerConfig';
|
27
|
-
function webpackConfigCreator(options) {
|
28
|
-
return {
|
29
|
-
mode: 'development',
|
30
|
-
output: (0, _outputConfig.outputConfig)(options),
|
31
|
-
devtool: 'cheap-source-map',
|
32
|
-
// stats: 'errors-only',
|
33
|
-
stats: {
|
34
|
-
children: false,
|
35
|
-
colors: true,
|
36
|
-
errorDetails: true // excludeAssets: /i18n/,
|
37
|
-
// excludeAssets: /./,
|
38
|
-
// warningsFilter: /\[mini-css-extract-plugin\]/
|
39
|
-
|
40
|
-
},
|
41
|
-
// devServer: devServerConfig(options),
|
42
|
-
optimization: (0, _optimizationConfig.optimizationConfig)(options),
|
43
|
-
module: {
|
44
|
-
rules: [...(0, _jsLoaders.jsLoaders)(options), ...(0, _cssLoaders.cssLoaders)(options), (0, _configWebWorkerLoader.configWebWorkerLoader)(options), (0, _configHtmlTemplateLoader.configHtmlTemplateLoader)(options), ...(0, _assetLoaders.assetLoaders)(options)]
|
45
|
-
},
|
46
|
-
plugins: (0, _plugins.plugins)(options),
|
47
|
-
resolve: (0, _resolvers.moduleResolver)(options),
|
48
|
-
resolveLoader: (0, _resolvers.loaderResolver)(options)
|
49
|
-
};
|
50
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.doBasicRequiermentCheck = doBasicRequiermentCheck;
|
7
|
-
|
8
|
-
function doBasicRequiermentCheck() {
|
9
|
-
const majorV = Number(process.version.slice(1, 4));
|
10
|
-
|
11
|
-
if (majorV >= 12 && majorV <= 18) {
|
12
|
-
return true;
|
13
|
-
}
|
14
|
-
|
15
|
-
throw `your node version not compactable with this cli please update node vesrion to 12 - 18, and your current version is ${process.version}`;
|
16
|
-
}
|
@@ -1,38 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.getCliPath = void 0;
|
7
|
-
|
8
|
-
var _os = require("os");
|
9
|
-
|
10
|
-
var _fs = require("fs");
|
11
|
-
|
12
|
-
var _path = require("path");
|
13
|
-
|
14
|
-
const appPath = process.cwd();
|
15
|
-
const isNodeModuleUnderAppFolder = __dirname.indexOf(appPath) !== -1;
|
16
|
-
const isWindows = (0, _os.platform)().toLowerCase() === 'win32';
|
17
|
-
const suffixExt = isWindows ? '.cmd' : ''; // function searchForCommandPath(commandName) {
|
18
|
-
// let pathFolders = __dirname.split(sep);
|
19
|
-
// let cliPath;
|
20
|
-
// while (pathFolders.pop()) {
|
21
|
-
// cliPath = join(pathFolders.join(sep), 'node_modules', '.bin', commandName);
|
22
|
-
// if (existsSync(cliPath)) {
|
23
|
-
// return cliPath;
|
24
|
-
// }
|
25
|
-
// }
|
26
|
-
// console.warn(`unable to find command "${commandName}"`);
|
27
|
-
// return join(__dirname, '..', 'node_modules', '.bin', commandName);
|
28
|
-
// }
|
29
|
-
|
30
|
-
function searchForCommandPath(libName) {
|
31
|
-
const commandPath = (0, _path.join)(__dirname, '..', '..', '..', 'node_modules', '.bin', libName); // TODO: need to check for windows machine reason command with ext added,
|
32
|
-
// when we use global react-cli package (executable) working or not
|
33
|
-
|
34
|
-
return (0, _fs.existsSync)(commandPath) ? commandPath : libName;
|
35
|
-
}
|
36
|
-
|
37
|
-
const getCliPath = !isNodeModuleUnderAppFolder ? commandName => searchForCommandPath(commandName + suffixExt) : commandName => commandName + suffixExt;
|
38
|
-
exports.getCliPath = getCliPath;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "doBasicRequiermentCheck", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _doBasicRequiermentCheck.doBasicRequiermentCheck;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "readArgsFormCommandLine", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _readArgsFormCommandLine.readArgsFormCommandLine;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "readOptionFormCommandLine", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function () {
|
21
|
-
return _readOptionFormCommandLine.readOptionFormCommandLine;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
|
25
|
-
var _readArgsFormCommandLine = require("./readArgsFormCommandLine");
|
26
|
-
|
27
|
-
var _readOptionFormCommandLine = require("./readOptionFormCommandLine");
|
28
|
-
|
29
|
-
var _doBasicRequiermentCheck = require("./doBasicRequiermentCheck");
|
@@ -1,35 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.spawnIO = spawnIO;
|
7
|
-
exports.spawnSyncIO = spawnSyncIO;
|
8
|
-
|
9
|
-
var _getCliPath = require("./getCliPath");
|
10
|
-
|
11
|
-
const {
|
12
|
-
spawnSync,
|
13
|
-
spawn
|
14
|
-
} = require('child_process');
|
15
|
-
|
16
|
-
function spawnSyncIO(commandName, args) {
|
17
|
-
const command = (0, _getCliPath.getCliPath)(commandName);
|
18
|
-
const result = spawnSync(command, args, {
|
19
|
-
stdio: 'inherit'
|
20
|
-
});
|
21
|
-
|
22
|
-
if (result.error || result.stderr) {
|
23
|
-
console.error(result.error || result.stderr);
|
24
|
-
} // console.log(result.output);
|
25
|
-
|
26
|
-
|
27
|
-
process.exit(result.status);
|
28
|
-
}
|
29
|
-
|
30
|
-
function spawnIO(commandName, args, cb) {
|
31
|
-
// const result =
|
32
|
-
spawn(commandName, args, {
|
33
|
-
stdio: 'inherit'
|
34
|
-
}, cb); // process.exit(result.status);
|
35
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.cliRootPath = exports.cliNodemodulesPath = exports.babelrcPath = exports.appPath = exports.appInitialHTMLTemplatePath = exports.CONFIG_ROOT = exports.BASE_CONFIG_KEY = void 0;
|
7
|
-
|
8
|
-
var _path = _interopRequireWildcard(require("path"));
|
9
|
-
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
11
|
-
|
12
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
13
|
-
|
14
|
-
const BASE_CONFIG_KEY = 'react-cli';
|
15
|
-
exports.BASE_CONFIG_KEY = BASE_CONFIG_KEY;
|
16
|
-
|
17
|
-
const cliRootPath = _path.default.resolve(__dirname, '..', '..');
|
18
|
-
|
19
|
-
exports.cliRootPath = cliRootPath;
|
20
|
-
const CONFIG_ROOT = 'client-build-config';
|
21
|
-
exports.CONFIG_ROOT = CONFIG_ROOT;
|
22
|
-
|
23
|
-
const cliNodemodulesPath = _path.default.resolve(cliRootPath, 'node_modules');
|
24
|
-
|
25
|
-
exports.cliNodemodulesPath = cliNodemodulesPath;
|
26
|
-
const babelrcPath = (0, _path.join)(cliRootPath, '.babelrc');
|
27
|
-
exports.babelrcPath = babelrcPath;
|
28
|
-
const appPath = process.cwd();
|
29
|
-
exports.appPath = appPath;
|
30
|
-
|
31
|
-
const appInitialHTMLTemplatePath = _path.default.join(process.cwd(), 'src', 'index.html');
|
32
|
-
|
33
|
-
exports.appInitialHTMLTemplatePath = appInitialHTMLTemplatePath;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.applyValuesToShema = applyValuesToShema;
|
7
|
-
|
8
|
-
function isObject(obj) {
|
9
|
-
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
|
10
|
-
}
|
11
|
-
|
12
|
-
function applyValuesToShema(schemas, customOptions, processEnv) {
|
13
|
-
const output = {};
|
14
|
-
|
15
|
-
function decideValue(schema, key, customOptions) {
|
16
|
-
const specificShema = schema[key];
|
17
|
-
const correspondingValue = customOptions && customOptions[key];
|
18
|
-
|
19
|
-
if (isObject(specificShema)) {
|
20
|
-
if (typeof specificShema.cli === 'string') {
|
21
|
-
var _ref, _processEnv$specificS;
|
22
|
-
|
23
|
-
return (_ref = (_processEnv$specificS = processEnv[specificShema.cli]) !== null && _processEnv$specificS !== void 0 ? _processEnv$specificS : correspondingValue) !== null && _ref !== void 0 ? _ref : specificShema.value;
|
24
|
-
}
|
25
|
-
|
26
|
-
return applyValuesToShema(specificShema, correspondingValue, processEnv);
|
27
|
-
}
|
28
|
-
|
29
|
-
return correspondingValue !== null && correspondingValue !== void 0 ? correspondingValue : schema[key];
|
30
|
-
} // console.log({schemas})
|
31
|
-
|
32
|
-
|
33
|
-
Object.keys(schemas).forEach(key => {
|
34
|
-
output[key] = decideValue(schemas, key, customOptions);
|
35
|
-
});
|
36
|
-
return output;
|
37
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.cliArgsToObject = cliArgsToObject;
|
7
|
-
|
8
|
-
/**
|
9
|
-
* experimental argument parsing logic
|
10
|
-
* @param {Array} cliArgs is when we use cli the options or args
|
11
|
-
*
|
12
|
-
* cliArgs:-
|
13
|
-
* `cbt start --port=2332 --mode=prod` in this command
|
14
|
-
* ['--port=2332', '--mode=prod'] these are cliArgs
|
15
|
-
*
|
16
|
-
* retunr {"port": 2332, "mode":"prod"}
|
17
|
-
*/
|
18
|
-
function cliArgsToObject(cliArgs) {
|
19
|
-
const processEnv = {};
|
20
|
-
cliArgs.forEach(option => {
|
21
|
-
if (/^--./.test(option)) {
|
22
|
-
const equIndex = option.indexOf('='); // equIndex = equIndex === -1 ? option.length : equIndex;
|
23
|
-
|
24
|
-
let key = option.slice(2, equIndex);
|
25
|
-
let value = option.slice(equIndex + 1);
|
26
|
-
|
27
|
-
if (equIndex === -1) {
|
28
|
-
key = option.slice(2);
|
29
|
-
value = true;
|
30
|
-
}
|
31
|
-
|
32
|
-
key = key.replace(/-|:/g, '_');
|
33
|
-
processEnv[key] = value;
|
34
|
-
}
|
35
|
-
});
|
36
|
-
return processEnv;
|
37
|
-
}
|
@@ -1,119 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _os = require("os");
|
9
|
-
|
10
|
-
// import { join } from 'path';
|
11
|
-
// import { cliRootPath } from '../constants';
|
12
|
-
// import { getIp } from '../server/getIp';
|
13
|
-
var _default = {
|
14
|
-
context: {
|
15
|
-
value: 'app',
|
16
|
-
cli: 'context'
|
17
|
-
},
|
18
|
-
enableChunkHash: {
|
19
|
-
value: true,
|
20
|
-
cli: 'enablehash'
|
21
|
-
},
|
22
|
-
output: {
|
23
|
-
value: 'build',
|
24
|
-
cli: 'output'
|
25
|
-
},
|
26
|
-
server: {
|
27
|
-
httpsCerts: {
|
28
|
-
value: '',
|
29
|
-
cli: 'https_certs'
|
30
|
-
},
|
31
|
-
host: {
|
32
|
-
value: (0, _os.hostname)(),
|
33
|
-
cli: 'host'
|
34
|
-
},
|
35
|
-
port: {
|
36
|
-
value: 9090,
|
37
|
-
cli: 'port'
|
38
|
-
},
|
39
|
-
domain: {
|
40
|
-
value: 'tsi',
|
41
|
-
cli: 'domain'
|
42
|
-
},
|
43
|
-
// domain: { value: null, cli: 'domain' },
|
44
|
-
mode: {
|
45
|
-
value: 'dev',
|
46
|
-
cli: 'mode'
|
47
|
-
},
|
48
|
-
disableContextURL: false,
|
49
|
-
hasMock: false,
|
50
|
-
mockPrefix: {
|
51
|
-
value: '/api',
|
52
|
-
cli: 'mock_prefix'
|
53
|
-
},
|
54
|
-
mockPort: {
|
55
|
-
value: 5000,
|
56
|
-
cli: 'mock_port'
|
57
|
-
}
|
58
|
-
},
|
59
|
-
css: {
|
60
|
-
selectorReplace: null,
|
61
|
-
classNameOptions: {
|
62
|
-
classNamePrefix: 'zd',
|
63
|
-
classNameBlob: false
|
64
|
-
},
|
65
|
-
plugins: {
|
66
|
-
rtlSplit: {
|
67
|
-
enableRTLSplit: false,
|
68
|
-
templateLabel: '{{--dir}}',
|
69
|
-
disableMinifySelector: false,
|
70
|
-
dirVarName: 'document.dir'
|
71
|
-
},
|
72
|
-
rtl: {
|
73
|
-
enable: false,
|
74
|
-
exclude: []
|
75
|
-
}
|
76
|
-
}
|
77
|
-
},
|
78
|
-
i18nChunkSplit: {
|
79
|
-
chunkSplitEnable: {
|
80
|
-
value: false,
|
81
|
-
cli: 'i18n_split'
|
82
|
-
},
|
83
|
-
disableDefault: false,
|
84
|
-
templateLabel: '{{--user-locale}}',
|
85
|
-
localeVarName: 'document.documentElement.lang',
|
86
|
-
jsonpFunc: 'console.log',
|
87
|
-
jsResource: null,
|
88
|
-
propertiesFolder: null
|
89
|
-
},
|
90
|
-
app: {
|
91
|
-
tpFolder: null,
|
92
|
-
moduleResolvePath: {
|
93
|
-
value: '',
|
94
|
-
cli: 'module_resolve_path'
|
95
|
-
},
|
96
|
-
htmlTemplate: {
|
97
|
-
inject: true
|
98
|
-
},
|
99
|
-
cdnMapping: {
|
100
|
-
isCdnEnabled: false,
|
101
|
-
variableName: '',
|
102
|
-
cssTemplate: '',
|
103
|
-
jsTemplate: '',
|
104
|
-
i18nTemplate: ''
|
105
|
-
},
|
106
|
-
serviceWorker: {
|
107
|
-
enableSw: false,
|
108
|
-
filePath: 'sw.js',
|
109
|
-
fileName: 'v1.js',
|
110
|
-
exitPath: '/',
|
111
|
-
replaceText: '//<!--AssetsFromBuild -->'
|
112
|
-
},
|
113
|
-
enableSMap: {
|
114
|
-
value: false,
|
115
|
-
cli: 'source_map_enable'
|
116
|
-
}
|
117
|
-
}
|
118
|
-
};
|
119
|
-
exports.default = _default;
|