mirror of
https://github.com/sern-handler/cli
synced 2026-06-28 02:32:20 +00:00
feat(skip): option to skip package manager selection (#20)
* feat: ability to skip package manager selection * fix: add option to skip too when you dont have both pm * fix: both work on npm/yarn on skip part * fix(init): fix typo Co-authored-by: Evo <85353424+EvolutionX-10@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
main_dir,
|
||||
gitInit,
|
||||
which_manager,
|
||||
skip_install_dep,
|
||||
name,
|
||||
} from '../prompts/init.js';
|
||||
import { npm } from '../utilities/npm.js';
|
||||
@@ -61,7 +62,10 @@ export async function init({ flags }) {
|
||||
if (pm === 'both') {
|
||||
const chosen = await prompt([which_manager]);
|
||||
choice = chosen.manager;
|
||||
} else choice = pm;
|
||||
} else {
|
||||
const chosen = await prompt([skip_install_dep]);
|
||||
choice = chosen.skip_install_dep ? pm : 'skip';
|
||||
}
|
||||
|
||||
await installDeps(choice, data.name);
|
||||
await editMain(data.name);
|
||||
|
||||
Reference in New Issue
Block a user