esa-cli 1.0.4-beta.4 → 1.0.4-beta.5
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.
|
@@ -202,6 +202,7 @@ export function getInitParamsFromArgv(argv) {
|
|
|
202
202
|
params.framework = undefined;
|
|
203
203
|
params.language = undefined;
|
|
204
204
|
params.yes = true;
|
|
205
|
+
params.installEsaCli = false;
|
|
205
206
|
}
|
|
206
207
|
if (typeof a.name === 'string')
|
|
207
208
|
params.name = a.name;
|
|
@@ -226,6 +227,8 @@ export function getInitParamsFromArgv(argv) {
|
|
|
226
227
|
params.git = Boolean(a.git);
|
|
227
228
|
if (typeof a.deploy === 'boolean')
|
|
228
229
|
params.deploy = Boolean(a.deploy);
|
|
230
|
+
if (typeof a['install-esa-cli'] === 'boolean')
|
|
231
|
+
params.installEsaCli = Boolean(a['install-esa-cli']);
|
|
229
232
|
return params;
|
|
230
233
|
}
|
|
231
234
|
// Configure project name
|
|
@@ -494,6 +497,18 @@ export const applyFileEdits = (initParams) => __awaiter(void 0, void 0, void 0,
|
|
|
494
497
|
}
|
|
495
498
|
});
|
|
496
499
|
export const installESACli = (initParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
500
|
+
if (!initParams.installEsaCli) {
|
|
501
|
+
const install = (yield promptParameter({
|
|
502
|
+
type: 'confirm',
|
|
503
|
+
question: 'Do you want to install esa-cli as a dev dependency?',
|
|
504
|
+
label: 'Install ESA CLI',
|
|
505
|
+
defaultValue: false
|
|
506
|
+
}));
|
|
507
|
+
initParams.installEsaCli = install;
|
|
508
|
+
}
|
|
509
|
+
if (!initParams.installEsaCli) {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
497
512
|
const targetPath = path.join(process.cwd(), initParams.name);
|
|
498
513
|
const res = yield execCommand(['npm', 'install', '-D', 'esa-cli'], {
|
|
499
514
|
cwd: targetPath,
|
|
@@ -54,6 +54,11 @@ const init = {
|
|
|
54
54
|
alias: 'd',
|
|
55
55
|
describe: 'Deploy after initialization',
|
|
56
56
|
type: 'boolean'
|
|
57
|
+
})
|
|
58
|
+
.option('install-esa-cli', {
|
|
59
|
+
describe: 'Install esa-cli as a dev dependency',
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
default: false
|
|
57
62
|
});
|
|
58
63
|
},
|
|
59
64
|
handler: (argv) => __awaiter(void 0, void 0, void 0, function* () {
|