diff --git a/package.json b/package.json index 1ddfc8bb03..b25bcd3788 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "docgen": "lerna run docgen", "docker-build:app": "yarn workspace example-app build && docker build . -t spotify/backstage", "docker-build": "yarn tsc && yarn workspace example-backend build-image", - "create-plugin": "backstage-cli create-plugin --scope internal", - "create-oss-plugin": "backstage-cli create-plugin --scope backstage", + "create-plugin": "backstage-cli create-plugin --scope backstage --no-private", "remove-plugin": "backstage-cli remove-plugin", "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push --force-publish; fi", "prettier:check": "prettier --check .", diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 38f2636b81..0573b8fda8 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -74,9 +74,7 @@ export async function templatingTask( throw new Error(`Failed to read template directory: ${error.message}`); }); - const isMonoRepo = (await fs.pathExists(paths.resolveTargetRoot('plugins'))) - ? true - : false; + const isMonoRepo = paths.resolveTargetRoot('lerna.json'); for (const file of files) { const destinationFile = file.replace(templateDir, destinationDir); diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index ad217b0be1..1180d67ea8 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,5 +1,5 @@ { - "name": "{{#if scopeName}}{{scopeName}}/{{/if}}/plugin-{{id}}", + "name": "{{#if scopeName}}{{scopeName}}/{{/if}}plugin-{{id}}", "version": "{{version}}", "main": "src/index.ts", "types": "src/index.ts", diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json index d36fba9e4d..40e967d267 100644 --- a/packages/cli/templates/default-plugin/tsconfig.json +++ b/packages/cli/templates/default-plugin/tsconfig.json @@ -5,9 +5,8 @@ "dev", "migrations" ], - "exclude": ["node_modules"], "compilerOptions": { "outDir": "dist-types", - "skipLibCheck": true + "rootDir": "." } }