diff --git a/packages/add-angular-to-qwik/bin/add-angular-to-qwik.ts b/packages/add-angular-to-qwik/bin/add-angular-to-qwik.ts index 4bcaa93..8a5e517 100644 --- a/packages/add-angular-to-qwik/bin/add-angular-to-qwik.ts +++ b/packages/add-angular-to-qwik/bin/add-angular-to-qwik.ts @@ -51,6 +51,7 @@ export const commandsObject: yargs.Argv = yargs async function main(parsedArgs: yargs.Arguments) { let isQwikNxInstalled = false; + let isNxDevkitInstalled = false; const pm = getRelevantPackageManagerCommand(); output.log({ @@ -78,6 +79,13 @@ async function main(parsedArgs: yargs.Arguments) { if (!isQwikNxInstalled) { execSync(`${pm.add} qwik-nx@latest nx@latest`, { stdio: [0, 1, 2] }); } + + isNxDevkitInstalled = checkIfPackageInstalled('@nx/devkit'); + + if (!isNxDevkitInstalled) { + execSync(`${pm.addDev} @nx/devkit@latest`, { stdio: [0, 1, 2] }); + } + const installMaterialExample = parsedArgs['installMaterialExample']; const installMaterialExampleFlag = installMaterialExample === true || installMaterialExample === false @@ -130,6 +138,7 @@ function getRelevantPackageManagerCommand() { return { install: pmc.install, add: pmc.add, + addDev: pmc.addDev, uninstall, }; }