diff --git a/packages/cli/templates/default-backend-plugin/dev/index.tsx b/packages/cli/templates/default-backend-plugin/dev/index.tsx deleted file mode 100644 index 812a5585d4..0000000000 --- a/packages/cli/templates/default-backend-plugin/dev/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { createDevApp } from '@backstage/dev-utils'; -import { plugin } from '../src/plugin'; - -createDevApp().registerPlugin(plugin).render(); diff --git a/packages/cli/templates/default-backend-plugin/package.json.hbs b/packages/cli/templates/default-backend-plugin/package.json.hbs index c0ba6676c5..51be95a3ba 100644 --- a/packages/cli/templates/default-backend-plugin/package.json.hbs +++ b/packages/cli/templates/default-backend-plugin/package.json.hbs @@ -1,46 +1,37 @@ { -"name": "@backstage/plugin-{{id}}", -"version": "{{version}}", -"main": "src/index.ts", -"types": "src/index.ts", -"license": "Apache-2.0", -"private": true, -"publishConfig": { -"access": "public", -"main": "dist/index.esm.js", -"types": "dist/index.d.ts" -}, -"scripts": { -"build": "backstage-cli backend:build", -"start": "backstage-cli plugin:serve", -"lint": "backstage-cli lint", -"test": "backstage-cli test", -"diff": "backstage-cli plugin:diff", -"prepack": "backstage-cli prepack", -"postpack": "backstage-cli postpack", -"clean": "backstage-cli clean" -}, -"dependencies": { -"@backstage/core": "^{{version}}", -"@backstage/theme": "^{{version}}", -"@material-ui/core": "^4.9.1", -"@material-ui/icons": "^4.9.1", -"@material-ui/lab": "4.0.0-alpha.45", -"react": "^16.13.1", -"react-dom": "^16.13.1", -"react-use": "^14.2.0" -}, -"devDependencies": { -"@backstage/cli": "^{{version}}", -"@backstage/dev-utils": "^{{version}}", -"@testing-library/jest-dom": "^5.10.1", -"@testing-library/react": "^10.4.1", -"@testing-library/user-event": "^12.0.7", -"@types/jest": "^25.2.2", -"@types/node": "^12.0.0", -"jest-fetch-mock": "^3.0.3" -}, -"files": [ -"dist" -] + "name": "@backstage/plugin-{{id}}-backend", + "version": "{{version}}", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "private": true, + "publishConfig": { + "access": "public", + "main": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "scripts": { + "start": "backstage-cli backend:dev", + "build": "backstage-cli backend:build", + "lint": "backstage-cli lint", + "test": "backstage-cli test", + "prepack": "backstage-cli prepack", + "postpack": "backstage-cli postpack", + "clean": "backstage-cli clean", + "mock-data": "./scripts/mock-data.sh" + }, + "dependencies": { + "@backstage/backend-common": "^{{version}}", + "@types/express": "^4.17.6", + "express": "^4.17.1", + "express-promise-router": "^3.0.3" + }, + "devDependencies": { + "@backstage/cli": "^{{version}}", + "@types/supertest": "^2.0.8", + "supertest": "^4.0.2" + }, + "files": [ + "dist" + ] } diff --git a/packages/cli/templates/default-backend-plugin/scripts/mock-data.sh b/packages/cli/templates/default-backend-plugin/scripts/mock-data.sh new file mode 100755 index 0000000000..ff30921715 --- /dev/null +++ b/packages/cli/templates/default-backend-plugin/scripts/mock-data.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo "use this script to load your service with some mock data if needed!" diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index da611a13b7..b457bc41fe 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -38,7 +38,7 @@ "@testing-library/user-event": "^12.0.7", "@types/jest": "^25.2.2", "@types/node": "^12.0.0", - "jest-fetch-mock": "^3.0.3" + "msw": "^0.19.5" }, "files": [ "dist"