gridsum-vue3-pc 1.0.6 → 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/create-vue3-pc.mjs +0 -19
- package/package.json +1 -1
package/bin/create-vue3-pc.mjs
CHANGED
|
@@ -189,21 +189,6 @@ function runCommandAsync(command, options = {}) {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
function tryGitInit(root) {
|
|
193
|
-
try {
|
|
194
|
-
const hasGit = spawn.sync('git', ['--version'], { stdio: 'ignore' });
|
|
195
|
-
if (hasGit.status !== 0) return;
|
|
196
|
-
spawn.sync('git', ['init'], { cwd: root, stdio: 'ignore' });
|
|
197
|
-
spawn.sync('git', ['add', '.'], { cwd: root, stdio: 'ignore' });
|
|
198
|
-
spawn.sync('git', ['-c', 'user.name=gridsum-vue3-pc', '-c', 'user.email=gridsum-vue3-pc@local', 'commit', '-m', 'Initial project scaffolded by gridsum-vue3-pc'], {
|
|
199
|
-
cwd: root,
|
|
200
|
-
stdio: 'ignore',
|
|
201
|
-
});
|
|
202
|
-
} catch {
|
|
203
|
-
// git init is best-effort
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
192
|
function checkNodeVersion() {
|
|
208
193
|
const version = parseInt(process.version.slice(1).split('.')[0]);
|
|
209
194
|
if (version < MIN_NODE_VERSION) {
|
|
@@ -478,10 +463,6 @@ async function main() {
|
|
|
478
463
|
process.stdout.write(`${pc.green('✓')} Dependencies installed!\n`);
|
|
479
464
|
}
|
|
480
465
|
|
|
481
|
-
if (!argv['no-git'] && !process.env._CREATE_VUE3_PC_TEST) {
|
|
482
|
-
tryGitInit(root);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
466
|
const cdProjectName = path.relative(process.cwd(), root);
|
|
486
467
|
let doneMessage = '';
|
|
487
468
|
|