From fd42fa6a03077e07cb066baa45361b90326fb514 Mon Sep 17 00:00:00 2001 From: Rafael Calpena Rodrigues Date: Fri, 13 Aug 2021 02:32:31 -0300 Subject: [PATCH] fix: use main branch and add npm 7 support --- lib/utils/bootstrap-ui-package.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/bootstrap-ui-package.ts b/lib/utils/bootstrap-ui-package.ts index 0c0bc4a..86e7534 100644 --- a/lib/utils/bootstrap-ui-package.ts +++ b/lib/utils/bootstrap-ui-package.ts @@ -46,7 +46,7 @@ export function bootstrapUIPackage( /* Initialize before npm i because husky requires git for setup */ if (isGitInstalled) { context.log.info(`Git is installed, initializing repo.`); - spawnSyncStrict('git', ['init'], defaultSpawnOptions); + spawnSyncStrict('git', ['init', '-b', 'main'], defaultSpawnOptions); } /* Some files should be automatically generated. Set them to read-only to avoid user manipulation */ @@ -72,7 +72,7 @@ export function bootstrapUIPackage( /* Run NPM Install */ context.log.info(`Installing npm dependencies.`); - spawnSyncStrict('npm', ['i'], defaultSpawnOptions); + spawnSyncStrict('npm', ['i', '--legacy-peer-deps'], defaultSpawnOptions); /* Create initial commit */ if (isGitInstalled) {