create-app: migrated to use package roles

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-03-08 15:22:43 +01:00
parent cd5172a1fb
commit bde30664c4
8 changed files with 43 additions and 22 deletions
+19
View File
@@ -0,0 +1,19 @@
---
'@backstage/create-app': patch
---
Updated template to use package roles. To apply this change to an existing app, check out the [migration guide](https://backstage.io/docs/tutorials/package-role-migration).
Specifically the following scripts in the root `package.json` have also been updated:
```diff
- "build": "lerna run build",
+ "build": "backstage-cli repo build --all",
...
- "lint": "lerna run lint --since origin/master --",
- "lint:all": "lerna run lint --",
+ "lint": "backstage-cli repo lint --since origin/master",
+ "lint:all": "backstage-cli repo lint",
```
+1 -1
View File
@@ -96,9 +96,9 @@
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test",
"lint": "backstage-cli package lint",
"test:e2e": "start-server-and-test start http://localhost:3000 cy:dev",
"test:e2e:ci": "start-server-and-test start http://localhost:3000 cy:run",
"lint": "backstage-cli package lint",
"cy:dev": "cypress open",
"cy:run": "cypress run"
},
+2 -2
View File
@@ -18,12 +18,12 @@
"backstage"
],
"scripts": {
"build": "backstage-cli package build",
"build-image": "docker build ../.. -f Dockerfile --tag example-backend",
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"build-image": "docker build ../.. -f Dockerfile --tag example-backend",
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
@@ -9,7 +9,7 @@
"dev": "concurrently \"yarn start\" \"yarn start-backend\"",
"start": "yarn workspace app start",
"start-backend": "yarn workspace backend start",
"build": "lerna run build",
"build": "backstage-cli repo build --all",
"build-image": "yarn workspace backend build-image",
"tsc": "tsc",
"tsc:full": "tsc --skipLibCheck false --incremental false",
@@ -17,8 +17,8 @@
"diff": "lerna run diff --",
"test": "backstage-cli test",
"test:all": "lerna run test -- --coverage",
"lint": "lerna run lint --since origin/master --",
"lint:all": "lerna run lint --",
"lint": "backstage-cli repo lint --since origin/master",
"lint:all": "backstage-cli repo lint",
"prettier:check": "prettier --check .",
"create-plugin": "backstage-cli create-plugin --scope internal",
"remove-plugin": "backstage-cli remove-plugin"
@@ -1,3 +1 @@
module.exports = {
extends: [require.resolve('@backstage/cli/config/eslint')],
};
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
@@ -3,6 +3,9 @@
"version": "0.0.0",
"private": true,
"bundled": true,
"backstage": {
"role": "frontend"
},
"dependencies": {
"@backstage/app-defaults": "^{{version '@backstage/app-defaults'}}",
"@backstage/catalog-model": "^{{version '@backstage/catalog-model'}}",
@@ -49,13 +52,13 @@
"start-server-and-test": "^1.10.11"
},
"scripts": {
"start": "backstage-cli app:serve",
"build": "backstage-cli app:build",
"clean": "backstage-cli clean",
"test": "backstage-cli test",
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test",
"lint": "backstage-cli package lint",
"test:e2e": "cross-env PORT=3001 start-server-and-test start http://localhost:3001 cy:dev",
"test:e2e:ci": "cross-env PORT=3001 start-server-and-test start http://localhost:3001 cy:run",
"lint": "backstage-cli lint",
"cy:dev": "cypress open",
"cy:run": "cypress run"
},
@@ -1,3 +1 @@
module.exports = {
extends: [require.resolve('@backstage/cli/config/eslint.backend')],
};
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
@@ -4,13 +4,16 @@
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"private": true,
"backstage": {
"role": "backend"
},
"scripts": {
"build": "backstage-cli backend:bundle",
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"build-image": "docker build ../.. -f Dockerfile --tag backstage",
"start": "backstage-cli backend:dev",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"clean": "backstage-cli clean",
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {