Merge pull request #15107 from SayakMukhopadhyay/master

fix: remove deprecated `create-plugin` script
This commit is contained in:
Fredrik Adelöw
2022-12-28 16:19:34 +01:00
committed by GitHub
11 changed files with 19 additions and 13 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/create-app': patch
---
Remove deprecated `create-plugin` script from the `default-app` template's `package.json.hbs`.
Also, update the documentation to not mention the `create-plugin` script and instead mention
the `new` script.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 263 KiB

+1 -1
View File
@@ -116,7 +116,7 @@ yarn clean # Remove all output folders and @backstage/cli cache
yarn diff # Make sure all plugins are up to date with the latest plugin template
yarn create-plugin # Create a new plugin
yarn new # Create a new module
```
> See
+1 -1
View File
@@ -101,7 +101,7 @@ are separated out into their own folder, see further down.
- [`cli/`](https://github.com/backstage/backstage/tree/master/packages/cli) -
One of the biggest packages in our project, the `cli` is used to build, serve,
diff, create-plugins and more. In the early days of this project, we started
diff, create plugins and more. In the early days of this project, we started
out with calling tools directly - such as `eslint` - through `package.json`.
But as it was tricky to have a good development experience around that when we
change named tooling, we opted for wrapping those in our own CLI. That way
+4 -4
View File
@@ -201,15 +201,15 @@ Usage: backstage-cli package postpack [options]
Restores the changes made by the prepack command
```
## create
## new
The `create` command opens up an interactive guide for you to create new things
The `new` command opens up an interactive guide for you to create new things
in your app. If you do not pass in any options it is completely interactive, but
it is possible to pre-select what you want to create using the `--select` flag,
and provide options using `--options`, for example:
and provide options using `--option`, for example:
```bash
backstage-cli create --select plugin --option id=foo
backstage-cli new --select plugin --option id=foo
```
This command is typically added as script in the root `package.json` to be
+1 -1
View File
@@ -28,7 +28,7 @@ lowercase characters separated by dashes, for example `carmen`, if it's a
package that adds an integration with a system named Carmen, for example. The
full NPM package name would then be something like
`@internal/plugin-carmen-backend`, depending on the other flags passed to the
`create-plugin` command, and your settings for the `create-plugin` command in
`new` command, and your settings for the `new` command in
your root `package.json`.
Creating the plugin will take a little while, so be patient. It will helpfully
+1 -1
View File
@@ -11,7 +11,7 @@ A Backstage Plugin adds functionality to Backstage.
To create a new plugin, make sure you've run `yarn install` and installed
dependencies, then run the following on your command line (a shortcut to
invoking the
[`backstage-cli create-plugin`](../local-dev/cli-commands.md#create-plugin))
[`backstage-cli new --select plugin`](../local-dev/cli-commands.md#new))
from the root of your project.
```bash
@@ -21,7 +21,7 @@ should have a separate package in a folder, which represents your plugin.
Example:
```
$ yarn create-plugin
$ yarn new --select plugin
> ? Enter an ID for the plugin [required] my-plugin
> ? Enter the owner(s) of the plugin. If specified, this will be added to CODEOWNERS for the plugin path. [optional]
+1 -1
View File
@@ -28,7 +28,7 @@ organization to easily install and add to their Backstage installation.
# 1. A New Plugin
Sam chooses to develop this plugin in a standalone project and creates a new
plugin using `npx @backstage/cli create-plugin`, which detects that it's not
plugin using `npx @backstage/cli new --select plugin`, which detects that it's not
being run in an existing project and therefore creates a separate plugin repo.
Spinning up the frontend with `yarn start`, Sam goes to work with getting the
+2 -2
View File
@@ -29,8 +29,8 @@ title: Adding Custom Plugin to Existing Monorepo App
# The Skeleton Plugin
1. Start by using the built in creator. From the terminal and root of your
project run: `yarn create-plugin`
1. Start by using the built-in creator. From the terminal and root of your
project run: `yarn new --select plugin`
1. Enter a plugin ID. I used `github-playground`
1. When the process finishes, let's start the backend:
`yarn --cwd packages/backend start`
@@ -20,7 +20,6 @@
"lint": "backstage-cli repo lint --since origin/{{defaultBranch}}",
"lint:all": "backstage-cli repo lint",
"prettier:check": "prettier --check .",
"create-plugin": "backstage-cli create-plugin --scope internal",
"new": "backstage-cli new --scope internal"
},
"workspaces": {