@zohodesk/react-cli 1.1.8 → 1.1.9
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 +37 -0
- package/bin/cli.js +16 -12
- package/docs/CustomChunks.md +12 -9
- package/lib/common/splitChunks.js +65 -45
- package/lib/common/testPattern.js +9 -9
- package/lib/configs/webpack.dev.config.js +6 -3
- package/lib/configs/webpack.docs.config.js +4 -2
- package/lib/configs/webpack.impact.config.js +4 -2
- package/lib/configs/webpack.prod.config.js +6 -3
- package/lib/deprecationLogger.js +41 -0
- package/lib/loaderUtils/getCSSLoaders.js +24 -7
- package/lib/pluginUtils/getDevPlugins.js +3 -2
- package/lib/pluginUtils/getProdPlugins.js +1 -1
- package/lib/plugins/ReportGeneratePlugin.js +8 -6
- package/lib/plugins/ResourceHintsPlugin.js +13 -3
- package/lib/plugins/UnusedFilesFindPlugin.js +7 -5
- package/lib/plugins/utils/fileHandling.js +35 -38
- package/lib/schemas/index.js +19 -36
- package/lib/utils/deprecationSupport.js +128 -0
- package/lib/utils/getOptions.js +19 -79
- package/lib/utils/index.js +14 -12
- package/lib/utils/initPreCommitHook.js +5 -5
- package/lib/utils/log.js +11 -0
- package/lib/utils/pullOrigin.js +3 -3
- package/lib/utils/reinstallDependencies.js +3 -3
- package/lib/utils/switchBranch.js +4 -2
- package/package.json +1 -1
- package/templates/docs/css/markdown.css +1 -1
package/lib/utils/log.js
ADDED
package/lib/utils/pullOrigin.js
CHANGED
@@ -7,20 +7,20 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _child_process = require("child_process");
|
9
9
|
|
10
|
-
var
|
10
|
+
var _log = require("./log");
|
11
11
|
|
12
12
|
var _default = (type = 'git', branchName) => new Promise(resolve => {
|
13
13
|
if (type === 'git') {
|
14
14
|
(0, _child_process.spawnSync)('git', ['pull', 'origin', branchName], {
|
15
15
|
encoding: 'utf8'
|
16
16
|
});
|
17
|
-
(0,
|
17
|
+
(0, _log.log)(branchName, 'Branch Pulled!');
|
18
18
|
resolve();
|
19
19
|
} else if (type === 'hg') {
|
20
20
|
(0, _child_process.spawnSync)('hg', ['pull'], {
|
21
21
|
encoding: 'utf8'
|
22
22
|
});
|
23
|
-
(0,
|
23
|
+
(0, _log.log)(branchName, 'Branch Pulled!');
|
24
24
|
resolve();
|
25
25
|
}
|
26
26
|
});
|
@@ -13,7 +13,7 @@ var _child_process = require("child_process");
|
|
13
13
|
|
14
14
|
var _gitRootDir = _interopRequireDefault(require("git-root-dir"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _log = require("./log");
|
17
17
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
19
|
|
@@ -80,7 +80,7 @@ let reinstallDependencies1 = pathToSubProjects => {
|
|
80
80
|
let diffs = packageDiffChecker(prePackageJson, currentPackageJson);
|
81
81
|
|
82
82
|
if (Object.keys(diffs).length) {
|
83
|
-
(0,
|
83
|
+
(0, _log.log)(diffs, `package diffs between branches for ${project} project`);
|
84
84
|
(0, _child_process.spawnSync)('rm', ['-rf', 'package-lock.json'], {
|
85
85
|
cwd: projPath,
|
86
86
|
stdio: 'inherit'
|
@@ -93,7 +93,7 @@ let reinstallDependencies1 = pathToSubProjects => {
|
|
93
93
|
dummy.push(`${name}@${version}`);
|
94
94
|
}
|
95
95
|
|
96
|
-
(0,
|
96
|
+
(0, _log.log)(`npm ${['install'].concat(dummy).join(' ')}`);
|
97
97
|
(0, _child_process.spawnSync)('npm', ['install'].concat(dummy), {
|
98
98
|
cwd: projPath,
|
99
99
|
stdio: 'inherit'
|
@@ -9,13 +9,15 @@ var _child_process = require("child_process");
|
|
9
9
|
|
10
10
|
var _utils = require("../utils");
|
11
11
|
|
12
|
+
var _log = require("./log");
|
13
|
+
|
12
14
|
var _default = (type = 'git', branchName) => new Promise(resolve => {
|
13
15
|
if (type === 'git') {
|
14
|
-
(0,
|
16
|
+
(0, _log.log)((0, _utils.getCurrentBranch)(type, process.cwd()), 'Before the branch switch');
|
15
17
|
(0, _child_process.spawnSync)('git', ['checkout', branchName, '--force'], {
|
16
18
|
encoding: 'utf8'
|
17
19
|
});
|
18
|
-
(0,
|
20
|
+
(0, _log.log)((0, _utils.getCurrentBranch)(type, process.cwd()), 'After the branch switch');
|
19
21
|
(0, _utils.pullOrigin)(type, branchName).then(resolve);
|
20
22
|
} else if (type === 'hg') {
|
21
23
|
(0, _child_process.spawnSync)('hg', ['update', branchName], {
|
package/package.json
CHANGED