From e655f626add5efa9967a6bd8a42b405ee7f09104 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 8 Apr 2025 01:30:11 +0200 Subject: [PATCH] update existing references to yarn dev to use yarn start instead Signed-off-by: Patrik Oldsberg --- .changeset/chubby-tables-tie.md | 7 +++++++ CONTRIBUTING.md | 2 +- contrib/docker/devops/makefile | 16 ++++++++-------- docs/getting-started/config/database.md | 2 +- docs/getting-started/index.md | 4 ++-- docs/getting-started/logging-in.md | 2 +- docs/permissions/custom-rules.md | 2 +- docs/permissions/getting-started.md | 4 ++-- docs/plugins/create-a-plugin.md | 2 +- docs/plugins/integrating-search-into-plugins.md | 2 +- docs/tooling/local-dev/debugging.md | 2 +- docs/tooling/local-dev/profiling.md | 2 +- docs/tutorials/setup-opentelemetry.md | 2 +- ...020-04-30-how-to-quickly-set-up-backstage.mdx | 2 +- .../cli/templates/backend-plugin/README.md.hbs | 2 +- packages/create-app/src/createApp.ts | 2 +- .../create-app/templates/default-app/README.md | 2 +- .../templates/default-app/playwright.config.ts | 2 +- .../examples/docker-compose.oauth2-proxy.yaml | 4 ++-- plugins/catalog/README.md | 2 +- plugins/devtools/README.md | 6 +++--- plugins/search/README.md | 2 +- 22 files changed, 40 insertions(+), 33 deletions(-) create mode 100644 .changeset/chubby-tables-tie.md diff --git a/.changeset/chubby-tables-tie.md b/.changeset/chubby-tables-tie.md new file mode 100644 index 0000000000..7aa5bc915b --- /dev/null +++ b/.changeset/chubby-tables-tie.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-devtools': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-search': patch +--- + +Updated `README.md` to use `yarn start` instead of `yarn dev`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58f894447b..bc67fba8c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ yarn tsc # does a first run of type generation and checks Open a terminal window and start the web app by using the following command from the project root. Make sure you have run the above mentioned commands first. ```bash -yarn dev +yarn start ``` This is going to start two things, the frontend (:3000) and the backend (:7007). diff --git a/contrib/docker/devops/makefile b/contrib/docker/devops/makefile index 048edc8886..4c376bd052 100644 --- a/contrib/docker/devops/makefile +++ b/contrib/docker/devops/makefile @@ -192,11 +192,11 @@ check: check-code check-docs check-type-dependencies check-styles # run development instance # BUG: the frontend seems to run on "$(backend_port)" (7007 default). -# The documentation states "This is going to start two things, +# The documentation states "This is going to start two things, # the frontend (:3000) and the backend (:7007)." # However, the frontend seems to end up running on 7007. .PHONY: dev -dev: build +start: build @docker run --rm -it \ --name $(docker_name_timestamp_prefix)-$@ \ -p $(frontend_port):$(frontend_host_port) \ @@ -206,12 +206,12 @@ dev: build -w /app \ --entrypoint "" \ $(docker_tag) \ - yarn dev + yarn start -# convenience: dev alias -.PHONY: start -start: dev +# convenience: start alias +.PHONY: dev +dev: start -# convenience: dev alias +# convenience: start alias .PHONY: run -run: dev +run: start diff --git a/docs/getting-started/config/database.md b/docs/getting-started/config/database.md index ecf461f02a..e068361966 100644 --- a/docs/getting-started/config/database.md +++ b/docs/getting-started/config/database.md @@ -111,7 +111,7 @@ If you opt for the second option of replacing the entire string, take care to no [Start the Backstage app](../index.md#2-run-the-backstage-app): ```shell -yarn dev +yarn start ``` After the Backstage frontend launches, you should notice that nothing has changed. This is a good sign. If everything is setup correctly above, this means that the data is flowing from the demo data files directly into your database! diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 7aee835910..cd86aa3343 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -116,11 +116,11 @@ If this fails on the `yarn install` step, it's likely that you will need to inst ## 2. Run the Backstage app -Your Backstage app is fully installed and ready to be run! Now that the installation is complete, you can go to the application directory and start the app using the `yarn dev` command. The `yarn dev` command will run both the frontend and backend as separate processes (named `[0]` and `[1]`) in the same window. +Your Backstage app is fully installed and ready to be run! Now that the installation is complete, you can go to the application directory and start the app using the `yarn start` command. The `yarn start` command will run both the frontend and backend as separate processes (named `[0]` and `[1]`) in the same window. ```bash cd my-backstage-app # your app name -yarn dev +yarn start ``` ![Screenshot of the command output, with the message web pack compiled successfully](../assets/getting-started/startup.png) diff --git a/docs/getting-started/logging-in.md b/docs/getting-started/logging-in.md index 16596865a2..337cc27ac7 100644 --- a/docs/getting-started/logging-in.md +++ b/docs/getting-started/logging-in.md @@ -16,7 +16,7 @@ You should have already [have a standalone app](./index.md) and completed the Gi ## 1. Login to Backstage -Run your Backstage app with `yarn dev`. Navigate to `http://localhost:3000`. +Run your Backstage app with `yarn start`. Navigate to `http://localhost:3000`. If you're not already logged in, you should see a login screen like this, diff --git a/docs/permissions/custom-rules.md b/docs/permissions/custom-rules.md index 41a1966a34..bd35f5de8e 100644 --- a/docs/permissions/custom-rules.md +++ b/docs/permissions/custom-rules.md @@ -187,7 +187,7 @@ To install custom rules in a plugin, we need to use the [`PermissionsRegistrySer backend.add(import('./extensions/catalogPermissionRules')); ``` -5. Now when you run you Backstage instance - `yarn dev` - the rule will be added to the catalog plugin. +5. Now when you run you Backstage instance - `yarn start` - the rule will be added to the catalog plugin. The updated policy will allow catalog entity resource permissions if any of the following are true: diff --git a/docs/permissions/getting-started.md b/docs/permissions/getting-started.md index 14058bccb0..cb0d29ef82 100644 --- a/docs/permissions/getting-started.md +++ b/docs/permissions/getting-started.md @@ -103,10 +103,10 @@ Now lets test end to end that the permissions framework is setup and configured enabled: true ``` -2. Now run `yarn dev`, Backstage should load up in your browser +2. Now run `yarn start`, Backstage should load up in your browser 3. You should see that you have entities in your Catalog, pretty simple 4. Let's change this line in our Test Permission Policy `return { result: AuthorizeResult.ALLOW };` to be `return { result: AuthorizeResult.DENY };` -5. Run `yarn dev` once again, Backstage should load up in your browser +5. Run `yarn start` once again, Backstage should load up in your browser 6. This time you should not see any entities in your Catalog, if you do then something went wrong along the way and you'll need to review the steps above 7. Revert the change we made in step 4 so that the line looks like this: `return { result: AuthorizeResult.ALLOW };` diff --git a/docs/plugins/create-a-plugin.md b/docs/plugins/create-a-plugin.md index 3810495707..ea0b088af7 100644 --- a/docs/plugins/create-a-plugin.md +++ b/docs/plugins/create-a-plugin.md @@ -25,7 +25,7 @@ And then select `frontend-plugin`. This will create a new Backstage Plugin based on the ID that was provided. It will be built and added to the Backstage App automatically. -> If the Backstage App is already running (with `yarn start` or `yarn dev`) you +> If the Backstage App is already running (with `yarn start`) you > should be able to see the default page for your new plugin directly by > navigating to `http://localhost:3000/my-plugin`. diff --git a/docs/plugins/integrating-search-into-plugins.md b/docs/plugins/integrating-search-into-plugins.md index c8cb0810f7..374a8aeb8a 100644 --- a/docs/plugins/integrating-search-into-plugins.md +++ b/docs/plugins/integrating-search-into-plugins.md @@ -245,7 +245,7 @@ You can also check out the documentation on [how to test Backstage plugin module #### 9. Running the collator locally -Run `yarn dev` in the root folder of your Backstage project and look for logs like these: +Run `yarn start` in the root folder of your Backstage project and look for logs like these: ```sh [backend]: YYYY-MM-DDTHH:MM:SS.000Z search info Task worker starting: search_index_faq_snippets, {"version":2,"cadence":"PT10M","initialDelayDuration":"PT3S","timeoutAfterDuration":"PT15M"} task=search_index_faq_snippets diff --git a/docs/tooling/local-dev/debugging.md b/docs/tooling/local-dev/debugging.md index 65354442b2..3f0103eaf4 100644 --- a/docs/tooling/local-dev/debugging.md +++ b/docs/tooling/local-dev/debugging.md @@ -19,7 +19,7 @@ Changing the level can be done by setting the `LOG_LEVEL` environment variable. For example, to turn on debug logs when running the app locally, you can run: ```shell -LOG_LEVEL=debug yarn dev +LOG_LEVEL=debug yarn start ``` The resulting log should now have more information available for debugging: diff --git a/docs/tooling/local-dev/profiling.md b/docs/tooling/local-dev/profiling.md index b1c904d6d0..8d88fc1769 100644 --- a/docs/tooling/local-dev/profiling.md +++ b/docs/tooling/local-dev/profiling.md @@ -60,6 +60,6 @@ See more command options in the AutoCannon documentation. Profiling the frontend can be done by using the `React DevTools` extension for Chrome or Firefox. The extension is available for download from the Chrome Web Store or the Firefox Add-ons website. -To start profiling, start the application with `yarn dev` and open inspector in the browser. In the +To start profiling, start the application with `yarn start` and open inspector in the browser. In the `Profiler` tab (far to the right), click the `Start profiling` button to start recording. After you have recorded some data by navigating through the page, click the `Stop profiling` button to stop the recording. diff --git a/docs/tutorials/setup-opentelemetry.md b/docs/tutorials/setup-opentelemetry.md index c7687f1ab9..3d7cb4bb4b 100644 --- a/docs/tutorials/setup-opentelemetry.md +++ b/docs/tutorials/setup-opentelemetry.md @@ -62,7 +62,7 @@ For local development, you can add the required flag in your `packages/backend/p ... ``` -You can now start your Backstage instance as usual, using `yarn dev`. +You can now start your Backstage instance as usual, using `yarn start`. ## Production Setup diff --git a/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.mdx b/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.mdx index b59f943245..d01bd496d1 100644 --- a/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.mdx +++ b/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.mdx @@ -45,7 +45,7 @@ The only thing you need to do is to start the app: ```bash cd my-app -yarn dev +yarn start ``` And you are good to go! 👍 diff --git a/packages/cli/templates/backend-plugin/README.md.hbs b/packages/cli/templates/backend-plugin/README.md.hbs index 76189c07c2..6b6b2a97bb 100644 --- a/packages/cli/templates/backend-plugin/README.md.hbs +++ b/packages/cli/templates/backend-plugin/README.md.hbs @@ -25,4 +25,4 @@ This plugin backend can be started in a standalone mode from directly in this package with `yarn start`. It is a limited setup that is most convenient when developing the plugin backend itself. -If you want to run the entire project, including the frontend, run `yarn dev` from the root directory. +If you want to run the entire project, including the frontend, run `yarn start` from the root directory. diff --git a/packages/create-app/src/createApp.ts b/packages/create-app/src/createApp.ts index 22b84ba5cd..d4d9dda18a 100644 --- a/packages/create-app/src/createApp.ts +++ b/packages/create-app/src/createApp.ts @@ -155,7 +155,7 @@ export default async (opts: OptionValues): Promise => { } Task.log( ` Run the app: ${chalk.cyan( - `cd ${opts.path ?? answers.name} && yarn dev`, + `cd ${opts.path ?? answers.name} && yarn start`, )}`, ); Task.log( diff --git a/packages/create-app/templates/default-app/README.md b/packages/create-app/templates/default-app/README.md index 8c7c4373fe..041c4fbe55 100644 --- a/packages/create-app/templates/default-app/README.md +++ b/packages/create-app/templates/default-app/README.md @@ -6,5 +6,5 @@ To start the app, run: ```sh yarn install -yarn dev +yarn start ``` diff --git a/packages/create-app/templates/default-app/playwright.config.ts b/packages/create-app/templates/default-app/playwright.config.ts index 733be130bd..37c7fb14c7 100644 --- a/packages/create-app/templates/default-app/playwright.config.ts +++ b/packages/create-app/templates/default-app/playwright.config.ts @@ -32,7 +32,7 @@ export default defineConfig({ ? [] : [ { - command: 'yarn dev', + command: 'yarn start', port: 3000, reuseExistingServer: true, timeout: 60_000, diff --git a/plugins/auth-backend/examples/docker-compose.oauth2-proxy.yaml b/plugins/auth-backend/examples/docker-compose.oauth2-proxy.yaml index f00e2e0987..1a8dfa5049 100755 --- a/plugins/auth-backend/examples/docker-compose.oauth2-proxy.yaml +++ b/plugins/auth-backend/examples/docker-compose.oauth2-proxy.yaml @@ -10,10 +10,10 @@ # # # You also need to switch out the baseUrl and listen port of both the frontend and -# backend, but we can do that through env vars when running `yarn dev`: +# backend, but we can do that through env vars when running `yarn start`: # # APP_CONFIG_app_baseUrl=http://localhost APP_CONFIG_app_listen_port=3000 \ -# APP_CONFIG_backend_baseUrl=http://localhost APP_CONFIG_backend_listen_port=7007 yarn dev +# APP_CONFIG_backend_baseUrl=http://localhost APP_CONFIG_backend_listen_port=7007 yarn start # # Once done, you can run the following from the root and then navigate to http://localhost # diff --git a/plugins/catalog/README.md b/plugins/catalog/README.md index 9375c14a4a..e8de1118ac 100644 --- a/plugins/catalog/README.md +++ b/plugins/catalog/README.md @@ -93,7 +93,7 @@ To evaluate the catalog and have a greater amount of functionality available, run the entire Backstage example application from the root folder: ```bash -yarn dev +yarn start ``` This will launch both frontend and backend in the same window, populated with diff --git a/plugins/devtools/README.md b/plugins/devtools/README.md index fef51626ad..080e8edfc6 100644 --- a/plugins/devtools/README.md +++ b/plugins/devtools/README.md @@ -95,7 +95,7 @@ To setup the DevTools frontend you'll need to do the following steps: ``` -8. Now run `yarn dev` from the root of your project and you should see the DevTools option show up just below Settings in your sidebar and clicking on it will get you to the [Info tab](#info) +8. Now run `yarn start` from the root of your project and you should see the DevTools option show up just below Settings in your sidebar and clicking on it will get you to the [Info tab](#info) ## Customizing @@ -151,7 +151,7 @@ The DevTools plugin has been designed so that you can customize the tabs to suit + ``` -6. Now run `yarn dev` from the root of your project. When you go to the DevTools you'll now see you have a third tab for [External Dependencies](#external-dependencies) +6. Now run `yarn start` from the root of your project. When you go to the DevTools you'll now see you have a third tab for [External Dependencies](#external-dependencies) With this setup you can add or remove the tabs as you'd like or add your own simply by editing your `CustomDevToolsPage.tsx` file @@ -190,7 +190,7 @@ Here's how to add the Catalog Unprocessed Entities tab: ``` -4. Now run `yarn dev` and navigate to the DevTools you'll see a new tab for Unprocessed Entities +4. Now run `yarn start` and navigate to the DevTools you'll see a new tab for Unprocessed Entities ## Permissions diff --git a/plugins/search/README.md b/plugins/search/README.md index 0aab198994..beab698b2e 100644 --- a/plugins/search/README.md +++ b/plugins/search/README.md @@ -6,7 +6,7 @@ Development is ongoing. You can follow the progress and contribute at the Backst ## Getting started -Run `yarn dev` in the root directory, and then navigate to [/search](http://localhost:3000/search) to check out the plugin. +Run `yarn start` in the root directory, and then navigate to [/search](http://localhost:3000/search) to check out the plugin. ### Optional Settings