@zohodesk/react-cli 1.1.8 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.log = log;
7
+
8
+ function log(...info) {
9
+ let print = console;
10
+ print.log(...info);
11
+ }
@@ -7,20 +7,20 @@ exports.default = void 0;
7
7
 
8
8
  var _child_process = require("child_process");
9
9
 
10
- var _utils = require("../utils");
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, _utils.log)(branchName, 'Branch Pulled!');
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, _utils.log)(branchName, 'Branch Pulled!');
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 _index = require("./index");
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, _index.log)(diffs, `package diffs between branches for ${project} project`);
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, _index.log)(`npm ${['install'].concat(dummy).join(' ')}`);
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, _utils.log)((0, _utils.getCurrentBranch)(type, process.cwd()), 'Before the branch switch');
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, _utils.log)((0, _utils.getCurrentBranch)(type, process.cwd()), 'After the branch switch');
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/react-cli",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "A CLI tool for build modern web application and libraries",
5
5
  "scripts": {
6
6
  "init": "node ./lib/utils/init.js",
@@ -5,7 +5,7 @@
5
5
 
6
6
  .markDown {
7
7
  line-height: 1.6;
8
- margin: 20px;
8
+ /* margin: 20px; */
9
9
  color: #333;
10
10
  font-size: 16px;
11
11
  }