diff --git a/src/blueprints/ember-addon/package.json b/src/blueprints/ember-addon/package.json index 089e4189..7f25fe6d 100644 --- a/src/blueprints/ember-addon/package.json +++ b/src/blueprints/ember-addon/package.json @@ -34,7 +34,7 @@ "lint": "pnpm --filter '*' lint", "lint:fix": "pnpm --filter '*' lint:fix", "prepare": "pnpm build", - "start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow", + "start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow", "start:addon": "pnpm --filter <%= options.packages.addon.name %> start", "start:test-app": "pnpm --filter <%= options.packages.testApp.name %> start", "test": "pnpm --filter '*' test" @@ -58,7 +58,7 @@ "lint": "yarn workspaces run lint", "lint:fix": "yarn workspaces run lint:fix", "prepare": "yarn build", - "start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow", + "start": "concurrently 'yarn:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow", "start:addon": "yarn workspace <%= options.packages.addon.name %> run start", "start:test-app": "yarn workspace <%= options.packages.testApp.name %> run start", "test": "yarn workspaces run test" diff --git a/src/steps/update-addon-package-json/update-scripts.ts b/src/steps/update-addon-package-json/update-scripts.ts index 69f24008..5c268e7a 100644 --- a/src/steps/update-addon-package-json/update-scripts.ts +++ b/src/steps/update-addon-package-json/update-scripts.ts @@ -6,7 +6,7 @@ export function updateScripts( packageJson: PackageJson, options: Options, ): void { - const { locations, packages } = options; + const { locations, packageManager, packages } = options; const scripts = convertToMap(packageJson['scripts']); @@ -16,8 +16,14 @@ export function updateScripts( */ scripts.clear(); - scripts.set('lint', "concurrently 'npm:lint:*(!fix)' --names 'lint:'"); - scripts.set('lint:fix', "concurrently 'npm:lint:*:fix' --names 'fix:'"); + scripts.set( + 'lint', + `concurrently '${packageManager}:lint:*(!fix)' --names 'lint:'`, + ); + scripts.set( + 'lint:fix', + `concurrently '${packageManager}:lint:*:fix' --names 'fix:'`, + ); scripts.set( 'lint:hbs', 'ember-template-lint . --no-error-on-unmatched-pattern', @@ -34,11 +40,11 @@ export function updateScripts( ); if (packages.addon.hasTypeScript) { - scripts.set('build', 'concurrently "npm:build:*"'); + scripts.set('build', `concurrently "${packageManager}:build:*"`); scripts.set('build:js', 'rollup --config'); scripts.delete('postpack'); - scripts.set('prepack', "concurrently 'npm:build:*'"); - scripts.set('start', 'concurrently "npm:start:*"'); + scripts.set('prepack', `concurrently '${packageManager}:build:*'`); + scripts.set('start', `concurrently "${packageManager}:start:*"`); scripts.set('start:js', 'rollup --config --watch --no-watch.clearScreen'); if (packages.addon.hasGlint) {