From 492876f260199f98e66316fbe4bb169c2d76f1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Mon, 15 Jun 2020 22:11:45 +0200 Subject: [PATCH 1/4] Remove old Home plugin --- plugins/home-page/.eslintrc.js | 3 - plugins/home-page/README.md | 1 - plugins/home-page/dev/index.tsx | 20 ---- plugins/home-page/package.json | 49 ---------- .../src/components/HomePage/HomePage.test.tsx | 32 ------ .../src/components/HomePage/HomePage.tsx | 97 ------------------- .../components/HomePage/SquadTechHealth.tsx | 52 ---------- .../src/components/HomePage/index.ts | 17 ---- plugins/home-page/src/index.ts | 17 ---- plugins/home-page/src/plugin.test.ts | 23 ----- plugins/home-page/src/plugin.ts | 25 ----- plugins/home-page/src/setupTests.ts | 17 ---- 12 files changed, 353 deletions(-) delete mode 100644 plugins/home-page/.eslintrc.js delete mode 100644 plugins/home-page/README.md delete mode 100644 plugins/home-page/dev/index.tsx delete mode 100644 plugins/home-page/package.json delete mode 100644 plugins/home-page/src/components/HomePage/HomePage.test.tsx delete mode 100644 plugins/home-page/src/components/HomePage/HomePage.tsx delete mode 100644 plugins/home-page/src/components/HomePage/SquadTechHealth.tsx delete mode 100644 plugins/home-page/src/components/HomePage/index.ts delete mode 100644 plugins/home-page/src/index.ts delete mode 100644 plugins/home-page/src/plugin.test.ts delete mode 100644 plugins/home-page/src/plugin.ts delete mode 100644 plugins/home-page/src/setupTests.ts diff --git a/plugins/home-page/.eslintrc.js b/plugins/home-page/.eslintrc.js deleted file mode 100644 index 13573efa9c..0000000000 --- a/plugins/home-page/.eslintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: [require.resolve('@backstage/cli/config/eslint')], -}; diff --git a/plugins/home-page/README.md b/plugins/home-page/README.md deleted file mode 100644 index ecac8aad72..0000000000 --- a/plugins/home-page/README.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to your home-page plugin! diff --git a/plugins/home-page/dev/index.tsx b/plugins/home-page/dev/index.tsx deleted file mode 100644 index 812a5585d4..0000000000 --- a/plugins/home-page/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/plugins/home-page/package.json b/plugins/home-page/package.json deleted file mode 100644 index 4a22dde3c8..0000000000 --- a/plugins/home-page/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@backstage/plugin-home-page", - "version": "0.1.1-alpha.8", - "main": "dist/index.esm.js", - "main:src": "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 plugin: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": "^0.1.1-alpha.8", - "@backstage/theme": "^0.1.1-alpha.8", - "@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": "^0.1.1-alpha.8", - "@backstage/dev-utils": "^0.1.1-alpha.8", - "@testing-library/jest-dom": "^5.7.0", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^10.2.4", - "@types/jest": "^25.2.2", - "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "^5.0.4", - "jest-fetch-mock": "^3.0.3", - "react-router-dom": "6.0.0-alpha.5" - }, - "files": [ - "dist/**/*.{js,d.ts}" - ] -} diff --git a/plugins/home-page/src/components/HomePage/HomePage.test.tsx b/plugins/home-page/src/components/HomePage/HomePage.test.tsx deleted file mode 100644 index e7df794a00..0000000000 --- a/plugins/home-page/src/components/HomePage/HomePage.test.tsx +++ /dev/null @@ -1,32 +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 React from 'react'; -import { render } from '@testing-library/react'; -import HomePage from './HomePage'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; - -describe('HomePage', () => { - it('should render', () => { - const rendered = render( - - - , - ); - expect(rendered.baseElement).toBeInTheDocument(); - }); -}); diff --git a/plugins/home-page/src/components/HomePage/HomePage.tsx b/plugins/home-page/src/components/HomePage/HomePage.tsx deleted file mode 100644 index 0da5d77bd5..0000000000 --- a/plugins/home-page/src/components/HomePage/HomePage.tsx +++ /dev/null @@ -1,97 +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 React, { FC } from 'react'; -import { Typography, Link, Grid } from '@material-ui/core'; -import { - Content, - InfoCard, - Header, - HomepageTimer, - Page, - pageTheme, -} from '@backstage/core'; -import SquadTechHealth from './SquadTechHealth'; -import Table from '@material-ui/core/Table'; -import TableBody from '@material-ui/core/TableBody'; -import TableCell from '@material-ui/core/TableCell'; -import TableContainer from '@material-ui/core/TableContainer'; -import TableHead from '@material-ui/core/TableHead'; -import TableRow from '@material-ui/core/TableRow'; - -const STATIC_DATA = [ - { id: 'backstage', kind: 'service' }, - { id: 'backstage-microsite', kind: 'website' }, -]; - -const HomePage: FC<{}> = () => { - const data = STATIC_DATA.map(({ id, kind }) => { - return { - id, - entity: ( - - {id} - - ), - kind: {kind}, - }; - }); - - const profile = { givenName: 'Suzy' }; - - return ( - -
- -
- - - - Things you own - - - - - - ID - Kind - - - - {data.map(d => ( - - {d.entity} - {d.kind} - - ))} - -
-
-
-
- - - -
-
-
- ); -}; - -export default HomePage; diff --git a/plugins/home-page/src/components/HomePage/SquadTechHealth.tsx b/plugins/home-page/src/components/HomePage/SquadTechHealth.tsx deleted file mode 100644 index c4e55c4dd5..0000000000 --- a/plugins/home-page/src/components/HomePage/SquadTechHealth.tsx +++ /dev/null @@ -1,52 +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 React, { FC } from 'react'; -import { Grid, Typography } from '@material-ui/core'; - -import { HorizontalScrollGrid, ProgressCard } from '@backstage/core'; - -const SquadTechHealth: FC<{}> = () => { - return ( - <> - Team Metrics - - - - - - - - - - ); -}; - -export default SquadTechHealth; diff --git a/plugins/home-page/src/components/HomePage/index.ts b/plugins/home-page/src/components/HomePage/index.ts deleted file mode 100644 index c5a0dcd139..0000000000 --- a/plugins/home-page/src/components/HomePage/index.ts +++ /dev/null @@ -1,17 +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. - */ - -export { default } from './HomePage'; diff --git a/plugins/home-page/src/index.ts b/plugins/home-page/src/index.ts deleted file mode 100644 index 3a0a0fe2d3..0000000000 --- a/plugins/home-page/src/index.ts +++ /dev/null @@ -1,17 +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. - */ - -export { plugin } from './plugin'; diff --git a/plugins/home-page/src/plugin.test.ts b/plugins/home-page/src/plugin.test.ts deleted file mode 100644 index aea6b90d2a..0000000000 --- a/plugins/home-page/src/plugin.test.ts +++ /dev/null @@ -1,23 +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 { plugin } from './plugin'; - -describe('home-page', () => { - it('should export plugin', () => { - expect(plugin).toBeDefined(); - }); -}); diff --git a/plugins/home-page/src/plugin.ts b/plugins/home-page/src/plugin.ts deleted file mode 100644 index 182d43b9b8..0000000000 --- a/plugins/home-page/src/plugin.ts +++ /dev/null @@ -1,25 +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 { createPlugin } from '@backstage/core'; -import HomePage from './components/HomePage'; - -export const plugin = createPlugin({ - id: 'home-page', - register({ router }) { - router.registerRoute('/home', HomePage); - }, -}); diff --git a/plugins/home-page/src/setupTests.ts b/plugins/home-page/src/setupTests.ts deleted file mode 100644 index 825bcd4115..0000000000 --- a/plugins/home-page/src/setupTests.ts +++ /dev/null @@ -1,17 +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 '@testing-library/jest-dom'; From 579fefad5ba29622d96456fe8198f55e1a9a42d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Tue, 16 Jun 2020 09:14:36 +0200 Subject: [PATCH 2/4] Rm from package.json --- packages/app/package.json | 1 - .../default-app/plugins/welcome/dev/index.tsx | 15 +++++++++++ .../welcome/src/components/Timer/Timer.tsx | 15 +++++++++++ .../welcome/src/components/Timer/index.ts | 15 +++++++++++ .../WelcomePage/WelcomePage.test.tsx | 16 ++++++++++++ .../components/WelcomePage/WelcomePage.tsx | 25 +++++++++++++------ .../src/components/WelcomePage/index.ts | 15 +++++++++++ .../default-app/plugins/welcome/src/index.ts | 15 +++++++++++ .../plugins/welcome/src/plugin.test.ts | 15 +++++++++++ .../default-app/plugins/welcome/src/plugin.ts | 15 +++++++++++ .../plugins/welcome/src/setupTests.ts | 15 +++++++++++ 11 files changed, 154 insertions(+), 8 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index fca15815e4..9a296a913c 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -9,7 +9,6 @@ "@backstage/plugin-circleci": "^0.1.1-alpha.8", "@backstage/plugin-explore": "^0.1.1-alpha.8", "@backstage/plugin-gitops-profiles": "^0.1.1-alpha.8", - "@backstage/plugin-home-page": "^0.1.1-alpha.8", "@backstage/plugin-lighthouse": "^0.1.1-alpha.8", "@backstage/plugin-register-component": "^0.1.1-alpha.8", "@backstage/plugin-scaffolder": "^0.1.1-alpha.8", diff --git a/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx b/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx index 6fce113093..264d6f801f 100644 --- a/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx @@ -1,3 +1,18 @@ +/* + * 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'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx index 24c79f91ee..2f39b72790 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx @@ -1,3 +1,18 @@ +/* + * 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 React, { FC } from 'react'; import { HeaderLabel } from '@backstage/core'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts index f1fc55bfe9..78d215adf4 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts @@ -1 +1,16 @@ +/* + * 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. + */ export { default } from './Timer'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx index 27e44a3f75..f3a1db4d84 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx @@ -1,3 +1,19 @@ +/* + * 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 React from 'react'; import { render } from '@testing-library/react'; import WelcomePage from './WelcomePage'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx index d9ef0524c6..7cc7fc9400 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx @@ -1,5 +1,20 @@ +/* + * 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 React, { FC } from 'react'; -import { Link as RouterLink } from 'react-router-dom'; import { Typography, Grid, @@ -73,12 +88,8 @@ const WelcomePage: FC<{}> = () => { We suggest you either check out the documentation for{' '} creating a plugin - {' '} - or have a look in the code for the{' '} - - Home Page - {' '} - in the directory "plugins/home-page/src". + + . diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts index b031301e7e..9c1745e713 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts @@ -1 +1,16 @@ +/* + * 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. + */ export { default } from './WelcomePage'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/index.ts b/packages/cli/templates/default-app/plugins/welcome/src/index.ts index 99edba26c3..224e293890 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/index.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/index.ts @@ -1 +1,16 @@ +/* + * 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. + */ export { plugin } from './plugin'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts b/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts index f5bf8e68c3..851c5c6190 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts @@ -1,3 +1,18 @@ +/* + * 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 { plugin } from './plugin'; describe('welcome', () => { diff --git a/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts b/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts index a65fad5348..3121e982b7 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts @@ -1,3 +1,18 @@ +/* + * 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 { createPlugin } from '@backstage/core'; import WelcomePage from './components/WelcomePage'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts b/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts index 7b0828bfa8..0bfa67b49a 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts @@ -1 +1,16 @@ +/* + * 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 '@testing-library/jest-dom'; From d197a41ccca8aa9c2a387ac0fc474fe926e6fd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Tue, 16 Jun 2020 09:21:39 +0200 Subject: [PATCH 3/4] Revert "Rm from package.json" This reverts commit 579fefad5ba29622d96456fe8198f55e1a9a42d0. --- packages/app/package.json | 1 + .../default-app/plugins/welcome/dev/index.tsx | 15 ----------- .../welcome/src/components/Timer/Timer.tsx | 15 ----------- .../welcome/src/components/Timer/index.ts | 15 ----------- .../WelcomePage/WelcomePage.test.tsx | 16 ------------ .../components/WelcomePage/WelcomePage.tsx | 25 ++++++------------- .../src/components/WelcomePage/index.ts | 15 ----------- .../default-app/plugins/welcome/src/index.ts | 15 ----------- .../plugins/welcome/src/plugin.test.ts | 15 ----------- .../default-app/plugins/welcome/src/plugin.ts | 15 ----------- .../plugins/welcome/src/setupTests.ts | 15 ----------- 11 files changed, 8 insertions(+), 154 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index 9a296a913c..fca15815e4 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -9,6 +9,7 @@ "@backstage/plugin-circleci": "^0.1.1-alpha.8", "@backstage/plugin-explore": "^0.1.1-alpha.8", "@backstage/plugin-gitops-profiles": "^0.1.1-alpha.8", + "@backstage/plugin-home-page": "^0.1.1-alpha.8", "@backstage/plugin-lighthouse": "^0.1.1-alpha.8", "@backstage/plugin-register-component": "^0.1.1-alpha.8", "@backstage/plugin-scaffolder": "^0.1.1-alpha.8", diff --git a/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx b/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx index 264d6f801f..6fce113093 100644 --- a/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx @@ -1,18 +1,3 @@ -/* - * 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'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx index 2f39b72790..24c79f91ee 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/Timer.tsx @@ -1,18 +1,3 @@ -/* - * 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 React, { FC } from 'react'; import { HeaderLabel } from '@backstage/core'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts index 78d215adf4..f1fc55bfe9 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/Timer/index.ts @@ -1,16 +1 @@ -/* - * 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. - */ export { default } from './Timer'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx index f3a1db4d84..27e44a3f75 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx @@ -1,19 +1,3 @@ -/* - * 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 React from 'react'; import { render } from '@testing-library/react'; import WelcomePage from './WelcomePage'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx index 7cc7fc9400..d9ef0524c6 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx @@ -1,20 +1,5 @@ -/* - * 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 React, { FC } from 'react'; +import { Link as RouterLink } from 'react-router-dom'; import { Typography, Grid, @@ -88,8 +73,12 @@ const WelcomePage: FC<{}> = () => { We suggest you either check out the documentation for{' '} creating a plugin - - . + {' '} + or have a look in the code for the{' '} + + Home Page + {' '} + in the directory "plugins/home-page/src". diff --git a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts index 9c1745e713..b031301e7e 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/components/WelcomePage/index.ts @@ -1,16 +1 @@ -/* - * 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. - */ export { default } from './WelcomePage'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/index.ts b/packages/cli/templates/default-app/plugins/welcome/src/index.ts index 224e293890..99edba26c3 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/index.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/index.ts @@ -1,16 +1 @@ -/* - * 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. - */ export { plugin } from './plugin'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts b/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts index 851c5c6190..f5bf8e68c3 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/plugin.test.ts @@ -1,18 +1,3 @@ -/* - * 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 { plugin } from './plugin'; describe('welcome', () => { diff --git a/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts b/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts index 3121e982b7..a65fad5348 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/plugin.ts @@ -1,18 +1,3 @@ -/* - * 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 { createPlugin } from '@backstage/core'; import WelcomePage from './components/WelcomePage'; diff --git a/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts b/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts index 0bfa67b49a..7b0828bfa8 100644 --- a/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts +++ b/packages/cli/templates/default-app/plugins/welcome/src/setupTests.ts @@ -1,16 +1 @@ -/* - * 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 '@testing-library/jest-dom'; From f7930427c438bc6dce40b5ecfd576d5333112039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Tue, 16 Jun 2020 09:22:28 +0200 Subject: [PATCH 4/4] Removed --- packages/app/package.json | 1 - packages/app/src/plugins.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index fca15815e4..9a296a913c 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -9,7 +9,6 @@ "@backstage/plugin-circleci": "^0.1.1-alpha.8", "@backstage/plugin-explore": "^0.1.1-alpha.8", "@backstage/plugin-gitops-profiles": "^0.1.1-alpha.8", - "@backstage/plugin-home-page": "^0.1.1-alpha.8", "@backstage/plugin-lighthouse": "^0.1.1-alpha.8", "@backstage/plugin-register-component": "^0.1.1-alpha.8", "@backstage/plugin-scaffolder": "^0.1.1-alpha.8", diff --git a/packages/app/src/plugins.ts b/packages/app/src/plugins.ts index 2cf2bde9d5..a6485835f7 100644 --- a/packages/app/src/plugins.ts +++ b/packages/app/src/plugins.ts @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { plugin as HomePagePlugin } from '@backstage/plugin-home-page'; export { plugin as WelcomePlugin } from '@backstage/plugin-welcome'; export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse'; export { plugin as CatalogPlugin } from '@backstage/plugin-catalog';