cc-core-cli 1.0.5 → 1.0.7
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/bin/index.js
CHANGED
|
@@ -59,18 +59,15 @@ if (action === 'upgrade') {
|
|
|
59
59
|
return false
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
spinner
|
|
63
|
-
|
|
62
|
+
const spinner = ora('(1/2) Copying files!').start();
|
|
64
63
|
fs.copySync(`${__dirname}/../template/${project}`, '.', {
|
|
65
64
|
recursive: true,
|
|
66
65
|
filter: (name) => {
|
|
67
66
|
return project === 'core' ? !name.includes('src/modules') : true
|
|
68
67
|
}
|
|
69
68
|
})
|
|
70
|
-
|
|
71
69
|
spinner.succeed('(1/2) Copying files!')
|
|
72
|
-
|
|
73
|
-
const spinner = ora('(2/2) Running npm install!').start();
|
|
70
|
+
spinner.start('(2/2) Running npm install!')
|
|
74
71
|
exec('npm install', (err) => {
|
|
75
72
|
if (err) {
|
|
76
73
|
return spinner.fail('(2/2) Running npm install!')
|
|
@@ -78,9 +75,6 @@ if (action === 'upgrade') {
|
|
|
78
75
|
|
|
79
76
|
spinner.succeed('(2/2) Running npm install!')
|
|
80
77
|
})
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
78
|
}
|
|
85
79
|
|
|
86
80
|
if (action === 'admin') {
|
|
@@ -97,8 +91,8 @@ if (action === 'admin') {
|
|
|
97
91
|
|
|
98
92
|
if (action === 'genpkg') {
|
|
99
93
|
const mode = options['_'][1] || '';
|
|
100
|
-
if (!['core
|
|
101
|
-
console.error('Please type a valid mode [core
|
|
94
|
+
if (!['core', 'admin'].includes(mode)) {
|
|
95
|
+
console.error('Please type a valid mode [core|admin]');
|
|
102
96
|
return false;
|
|
103
97
|
}
|
|
104
98
|
const path = options['_'][2] || '.';
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|