From 9a1653e449ad1b8dfa3b5cac12a02b949fe76e80 Mon Sep 17 00:00:00 2001 From: Dominik Horn Date: Wed, 26 Feb 2020 15:23:55 +0100 Subject: [PATCH] add barebones belbin matching tool package #12 --- packages/belbin-matcher/package.json | 21 ++++++++++++++++++ .../belbinMatcherPage.component.tsx | 6 +++++ packages/belbin-matcher/src/index.ts | 1 + packages/belbin-matcher/tsconfig.json | 14 ++++++++++++ packages/frontend/package.json | 3 ++- packages/frontend/src/util/approutes.tsx | 22 +++++++++++-------- packages/frontend/tsconfig.json | 3 +++ 7 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 packages/belbin-matcher/package.json create mode 100644 packages/belbin-matcher/src/components/belbinMatcherPage.component.tsx create mode 100644 packages/belbin-matcher/src/index.ts create mode 100644 packages/belbin-matcher/tsconfig.json diff --git a/packages/belbin-matcher/package.json b/packages/belbin-matcher/package.json new file mode 100644 index 0000000..12d51ec --- /dev/null +++ b/packages/belbin-matcher/package.json @@ -0,0 +1,21 @@ +{ + "name": "elite-belbin-matcher", + "version": "1.0.0", + "private": true, + "publishConfig": { + "access": "public" + }, + "types": "dist/index.d.ts", + "main": "dist/index.js", + "scripts": { + "clean": "rm -rf dist/ node_modules/ tsconfig.tsbuildinfo" + }, + "devDependencies": { + "@types/react": "^16.9.11", + "@types/react-router": "^5.1.3", + "elite-types": "^1.0.0" + }, + "dependencies": { + "react": "^16.12.0" + } +} diff --git a/packages/belbin-matcher/src/components/belbinMatcherPage.component.tsx b/packages/belbin-matcher/src/components/belbinMatcherPage.component.tsx new file mode 100644 index 0000000..5ce9c97 --- /dev/null +++ b/packages/belbin-matcher/src/components/belbinMatcherPage.component.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import { RouteComponentProps } from 'react-router'; + +export interface BelbinMatcherPageProps extends RouteComponentProps {} + +export const BelbinMatcherPage = (props: BelbinMatcherPageProps) =>
Hier könnte Ihre Werbung stehen
; diff --git a/packages/belbin-matcher/src/index.ts b/packages/belbin-matcher/src/index.ts new file mode 100644 index 0000000..f716303 --- /dev/null +++ b/packages/belbin-matcher/src/index.ts @@ -0,0 +1 @@ +export * from './components/belbinMatcherPage.component'; diff --git a/packages/belbin-matcher/tsconfig.json b/packages/belbin-matcher/tsconfig.json new file mode 100644 index 0000000..ccfc6c0 --- /dev/null +++ b/packages/belbin-matcher/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "baseUrl": "src" + }, + "include": ["src/**/*"], + "references": [ + { + "path": "../types" + } + ] +} diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 5468a6f..7ab15dc 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -26,6 +26,7 @@ "react-router": "^5.1.2", "react-router-dom": "^5.1.2", "elite-feature-flags": "^1.0.0", - "elite-configuration": "^1.0.0" + "elite-configuration": "^1.0.0", + "elite-belbin-matcher": "^1.0.0" } } diff --git a/packages/frontend/src/util/approutes.tsx b/packages/frontend/src/util/approutes.tsx index e68b8cd..e74294b 100644 --- a/packages/frontend/src/util/approutes.tsx +++ b/packages/frontend/src/util/approutes.tsx @@ -1,8 +1,8 @@ -import * as H from 'history'; import * as React from 'react'; import { RouteProps, Redirect } from 'react-router'; import { HomePage } from '../components/pages/HomePage'; import { LinkPage } from '../components/pages/LinkPage'; +import { BelbinMatcherPage } from 'elite-belbin-matcher'; // If necessary, add support for: H.LocationDescriptor | ((location: H.Location) => H.LocationDescriptor); type LinkType = string; @@ -30,8 +30,8 @@ export function getLinkForPage(route: AppRouteProps): LinkType { /** * Retrieves the humand readable link title/displayed name - * for a given route - * + * for a given route + * * @param route */ export function getLinkDisplayNameForPage(route: AppRouteProps): string { @@ -48,14 +48,21 @@ export function getLinkDisplayNameForPage(route: AppRouteProps): string { export const HOME_PAGE: AppRouteProps = { path: '/home', linkDisplayName: 'Home', - render: props => + render: props => , }; // Page with searchable, useful links for elite-se-degree program export const LINK_PAGE: AppRouteProps = { path: '/links', linkDisplayName: 'Useful Links', - render: props => + render: props => , +}; + +// Belbin matching tool +export const BELBIN_PAGE: AppRouteProps = { + path: '/belbin', + linkDisplayName: 'Belbin Matching Tool', + render: props => , }; // Simply redirect to the main page on 404 @@ -64,7 +71,4 @@ export const ERROR_404_PAGE: AppRouteProps = { render: () => , }; -export const APP_ROUTES: AppRouteProps[] = [ - HOME_PAGE, - LINK_PAGE -]; \ No newline at end of file +export const APP_ROUTES: AppRouteProps[] = [HOME_PAGE, LINK_PAGE, BELBIN_PAGE]; diff --git a/packages/frontend/tsconfig.json b/packages/frontend/tsconfig.json index c4af582..409c4f1 100644 --- a/packages/frontend/tsconfig.json +++ b/packages/frontend/tsconfig.json @@ -13,6 +13,9 @@ { "path": "../feature-flags" }, + { + "path": "../belbin-matcher" + }, { "path": "../types" }