Update docs to always use yarn add --cwd for app & backend
Some commands currently error, and others are simply formatted inconsistently. This format seems to work and be the most popular/common, so I applied it to all similar occurrences. Signed-off-by: Jan Van Bruggen <JanVB@verily.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch
|
||||
'@backstage/plugin-api-docs-module-protoc-gen-doc': patch
|
||||
'@backstage/plugin-code-coverage-backend': patch
|
||||
'@backstage/plugin-azure-devops-backend': patch
|
||||
'@backstage/backend-test-utils': patch
|
||||
'@backstage/plugin-analytics-module-ga': patch
|
||||
'@backstage/plugin-azure-sites-backend': patch
|
||||
'@backstage/plugin-microsoft-calendar': patch
|
||||
'@backstage/plugin-catalog-graph': patch
|
||||
'@backstage/plugin-code-coverage': patch
|
||||
'@backstage/plugin-adr-backend': patch
|
||||
'@backstage/plugin-azure-sites': patch
|
||||
'@backstage/plugin-lighthouse': patch
|
||||
'@backstage/plugin-shortcuts': patch
|
||||
'@backstage/plugin-xcmetrics': patch
|
||||
'@backstage/plugin-allure': patch
|
||||
'@backstage/plugin-ilert': patch
|
||||
'@backstage/plugin-home': patch
|
||||
---
|
||||
|
||||
Update docs to always use `yarn add --cwd` for app & backend
|
||||
@@ -22,7 +22,8 @@ to an entity in the software catalog.
|
||||
1. Add the plugin's npm package to the repo:
|
||||
|
||||
```bash
|
||||
yarn workspace app add @backstage/plugin-circleci
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-circleci
|
||||
```
|
||||
|
||||
Note the plugin is added to the `app` package, rather than the root
|
||||
|
||||
@@ -63,7 +63,7 @@ As this provider is not one of the default providers, you will first need to ins
|
||||
the AWS catalog plugin:
|
||||
|
||||
```bash
|
||||
# From the Backstage root directory
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-aws
|
||||
```
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ As this provider is not one of the default providers, you will first need to ins
|
||||
the Gerrit provider plugin:
|
||||
|
||||
```bash
|
||||
# From the Backstage root directory
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-gerrit
|
||||
```
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ As this provider is not one of the default providers, you will first need to ins
|
||||
the gitlab catalog plugin:
|
||||
|
||||
```bash
|
||||
# From the Backstage root directory
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-gitlab
|
||||
```
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ The permissions framework uses a new `permission-backend` plugin to accept autho
|
||||
1. Add `@backstage/plugin-permission-backend` as a dependency of your Backstage backend:
|
||||
|
||||
```bash
|
||||
$ yarn workspace backend add @backstage/plugin-permission-backend
|
||||
# From your Backstage root directory
|
||||
$ yarn add --cwd packages/backend @backstage/plugin-permission-backend
|
||||
```
|
||||
|
||||
2. Add the following to a new file, `packages/backend/src/plugins/permission.ts`. This adds the permission-backend router, and configures it with a policy which allows everything.
|
||||
|
||||
@@ -39,9 +39,10 @@ The source code is available here:
|
||||
|
||||
2. Add these packages as dependencies for your Backstage app:
|
||||
|
||||
```
|
||||
$ yarn workspace backend add @internal/plugin-todo-list-backend @internal/plugin-todo-list-common
|
||||
$ yarn workspace app add @internal/plugin-todo-list
|
||||
```sh
|
||||
# From your Backstage root directory
|
||||
$ yarn add --cwd packages/backend @internal/plugin-todo-list-backend @internal/plugin-todo-list-common
|
||||
$ yarn add --cwd packages/app @internal/plugin-todo-list
|
||||
```
|
||||
|
||||
3. Include the backend and frontend plugin in your application:
|
||||
|
||||
@@ -66,7 +66,7 @@ To actually attach and run the plugin router, you will make some modifications
|
||||
to your backend.
|
||||
|
||||
```bash
|
||||
# From the Backstage root directory
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @internal/plugin-carmen-backend@^0.1.1 # Change this to match the plugin's package.json
|
||||
```
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ package. If you intend to use both PostgreSQL and SQLite, you can install
|
||||
both of them.
|
||||
|
||||
```bash
|
||||
# From the Backstage root directory
|
||||
# From your Backstage root directory
|
||||
# install pg if you need PostgreSQL
|
||||
yarn add --cwd packages/backend pg
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Test helpers library for Backstage backends.
|
||||
Add the library as a `devDependency` to your backend package:
|
||||
|
||||
```sh
|
||||
# From the Backstage root directory, go to your backend package, or to a backend plugin
|
||||
# From your Backstage root directory, go to your backend package, or to a backend plugin
|
||||
cd plugins/my-plugin-backend
|
||||
yarn add --dev @backstage/backend-test-utils
|
||||
```
|
||||
|
||||
@@ -19,9 +19,8 @@ Here's how to get the backend up and running:
|
||||
1. First we need to add the `@backstage/plugin-adr-backend` package to your backend:
|
||||
|
||||
```sh
|
||||
# From the Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-adr-backend
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-adr-backend
|
||||
```
|
||||
|
||||
2. Then we will create a new file named `packages/backend/src/plugins/adr.ts`, and add the
|
||||
|
||||
@@ -4,16 +4,9 @@ Welcome to the Backstage Allure plugin. This plugin add an entity service page t
|
||||
|
||||
## Install
|
||||
|
||||
Run the below command from the `app` package directory.
|
||||
|
||||
```shell
|
||||
yarn add @backstage/plugin-allure
|
||||
```
|
||||
|
||||
alternatively, you can execute below command from the root directory of your Backstage app.
|
||||
|
||||
```shell
|
||||
yarn workspace app add @backstage/plugin-allure
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-allure
|
||||
```
|
||||
|
||||
## Configure
|
||||
|
||||
@@ -9,7 +9,12 @@ This plugin contains no other functionality.
|
||||
## Installation
|
||||
|
||||
1. Install the plugin package in your Backstage app:
|
||||
`cd packages/app && yarn add @backstage/plugin-analytics-module-ga`
|
||||
|
||||
```sh
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-analytics-module-ga
|
||||
```
|
||||
|
||||
2. Wire up the API implementation to your App:
|
||||
|
||||
```tsx
|
||||
|
||||
@@ -6,8 +6,9 @@ This package contains ApiDefinitionWidgets for the following projects:
|
||||
|
||||
## Setup
|
||||
|
||||
```
|
||||
yarn add @backstage/plugin-api-docs-module-protoc-gen-doc
|
||||
```sh
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-api-docs-module-protoc-gen-doc
|
||||
```
|
||||
|
||||
## Add the GrpcDocsApiWidget to your apis
|
||||
|
||||
@@ -30,9 +30,8 @@ Here's how to get the backend up and running:
|
||||
1. First we need to add the `@backstage/plugin-azure-devops-backend` package to your backend:
|
||||
|
||||
```sh
|
||||
# From the Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-azure-devops-backend
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-azure-devops-backend
|
||||
```
|
||||
|
||||
2. Then we will create a new file named `packages/backend/src/plugins/azure-devops.ts`, and add the
|
||||
|
||||
@@ -36,7 +36,7 @@ Here's how to get the backend plugin up and running:
|
||||
1. First we need to add the `@backstage/plugin-azure-sites-backend` package to your backend:
|
||||
|
||||
```sh
|
||||
# From the Backstage root directory
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-azure-sites-backend
|
||||
```
|
||||
|
||||
|
||||
@@ -44,10 +44,11 @@ azure.com/microsoft-web-sites: func-testapp
|
||||
|
||||
### Install the component
|
||||
|
||||
1. Install the plugin in the `packages/app` directory
|
||||
1. Install the plugin
|
||||
|
||||
```sh
|
||||
yarn add @backstage/plugin-azure-sites
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-azure-sites
|
||||
```
|
||||
|
||||
2. Add widget component to your Backstage instance:
|
||||
|
||||
@@ -41,7 +41,7 @@ The Incremental Entity Provider backend is designed for data sources that provid
|
||||
|
||||
## Installation
|
||||
|
||||
1. Install `@backstage/plugin-catalog-backend-module-incremental-ingestion` with `yarn workspace backend add @backstage/plugin-catalog-backend-module-incremental-ingestion`
|
||||
1. Install `@backstage/plugin-catalog-backend-module-incremental-ingestion` with `yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-incremental-ingestion` from the Backstage root directory.
|
||||
2. In your catalog.ts, import `IncrementalCatalogBuilder` from `@backstage/plugin-catalog-backend-module-incremental-ingestion` and instantiate it with `await IncrementalCatalogBuilder.create(env, builder)`. You have to pass `builder` into `IncrementalCatalogBuilder.create` function because `IncrementalCatalogBuilder` will convert an `IncrementalEntityProvider` into an `EntityProvider` and call `builder.addEntityProvider`.
|
||||
|
||||
```ts
|
||||
|
||||
@@ -24,9 +24,10 @@ The plugin comes with these features:
|
||||
|
||||
To use the catalog graph plugin, you have to add some things to your Backstage app:
|
||||
|
||||
1. Add a dependency to your `packages/app/package.json`, run:
|
||||
1. Add a dependency to your `packages/app/package.json`:
|
||||
```sh
|
||||
yarn add @backstage/plugin-catalog-graph
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-catalog-graph
|
||||
```
|
||||
2. Add the `CatalogGraphPage` to your `packages/app/src/App.tsx`:
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ This is the backend part of the `code-coverage` plugin. It takes care of process
|
||||
|
||||
## Installation
|
||||
|
||||
`yarn workspace backend add @backstage/plugin-code-coverage-backend`
|
||||
```sh
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/backend @backstage/plugin-code-coverage-backend
|
||||
```
|
||||
|
||||
First create a `codecoverage.ts` file here: `packages/backend/src/plugins`. Now add the following as its content:
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ This is the frontend part of the code-coverage plugin. It displays code coverage
|
||||
|
||||
## Installation
|
||||
|
||||
`yarn workspace app add @backstage/plugin-code-coverage`
|
||||
```sh
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-code-coverage
|
||||
```
|
||||
|
||||
Finally you need to import and render the code coverage entity, in `packages/app/src/components/catalog/EntityPage.tsx` add the following:
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ For App Integrators, the system is designed to be composable to give total freed
|
||||
If you have a standalone app (you didn't clone this repo), then do
|
||||
|
||||
```bash
|
||||
# From the Backstage repository root
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-home
|
||||
```
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ In detail this plugin provides:
|
||||
Install the plugin:
|
||||
|
||||
```bash
|
||||
# From the Backstage repository root
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-ilert
|
||||
```
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ with the environment variable \`LAS_CORS\` set to \`true\`._
|
||||
When you have an instance running that Backstage can hook into, first install the plugin into your app:
|
||||
|
||||
\`\`\`sh
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-lighthouse
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-lighthouse
|
||||
\`\`\`
|
||||
|
||||
Modify your app routes in \`App.tsx\` to include the \`LighthousePage\` component exported from the plugin, for example:
|
||||
|
||||
@@ -25,7 +25,7 @@ The following sections will help you set up the Microsoft calendar plugin.
|
||||
1. Install the plugin by running this command
|
||||
|
||||
```bash
|
||||
# From the Backstage repository root
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-microsoft-calendar
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ The shortcuts plugin allows a user to have easy access to pages within a Backsta
|
||||
### Install the package:
|
||||
|
||||
```bash
|
||||
yarn add @backstage/plugin-shortcuts
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-shortcuts
|
||||
```
|
||||
|
||||
### Register plugin:
|
||||
|
||||
@@ -7,10 +7,9 @@ With this plugin, you can view data from XCMetrics directly in Backstage.
|
||||
|
||||
## Getting started
|
||||
|
||||
From `packages/app`:
|
||||
|
||||
```bash
|
||||
yarn add @backstage/plugin-xcmetrics
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @backstage/plugin-xcmetrics
|
||||
```
|
||||
|
||||
In `packages/app/src/App.tsx`, add the following:
|
||||
|
||||
Reference in New Issue
Block a user