Skip to content

Commit

Permalink
Migrate design system from ENGAGE-HF (#3)
Browse files Browse the repository at this point in the history
# Migrate design system from ENGAGE-HF

## ♻️ Current situation & Problem
ENGAGE-HF repository contains design system package. We aim to make it
reusable across many different projects.


## ⚙️ Release Notes 
* Migrate design system from ENGAGE-HF packages
* Update GitHub actions to configure publishing a package
* Remove old Next-related dependencies, files, configurations


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).

---------

Co-authored-by: Paul Schmiedmayer <[email protected]>
  • Loading branch information
arkadiuszbachorski and PSchmiedmayer authored Oct 29, 2024
1 parent 9f1e2a9 commit 7e3bde0
Show file tree
Hide file tree
Showing 244 changed files with 19,053 additions and 7,056 deletions.
20 changes: 0 additions & 20 deletions .dockerignore

This file was deleted.

22 changes: 18 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"typescript": {
"project": ["./tsconfig.json"]
}
}
},
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/strict-type-checked",
Expand All @@ -16,8 +23,7 @@
"**/dist/*",
"/docs/**",
"/out/**",
"**/jest.config.js",
"**/next.config.js",
"/coverage/**",
"**/postcss.config.js",
"**/tailwind.config.js"
],
Expand Down Expand Up @@ -77,6 +83,11 @@
// false negatives
"import/namespace": ["off"],
"no-empty-pattern": "off",
"@typescript-eslint/no-empty-object-type": [
"error",
// `interface SpecificVariantProps extends VariantProps {}` is fine
{ "allowInterfaces": "with-single-extends" }
],
// make sure to `await` inside try…catch
"@typescript-eslint/return-await": ["error", "in-try-catch"],
"@typescript-eslint/no-confusing-void-expression": [
Expand All @@ -99,11 +110,14 @@
"error",
{ "allowNumber": true, "allowBoolean": true }
],
"react/no-unescaped-entities": "off"
"react/no-unescaped-entities": "off",
// some tanstack router functions result are thrown, like notFound
"@typescript-eslint/only-throw-error": "off",
"@next/next/no-img-element": "off"
},
"overrides": [
{
"files": ["app/**/*.ts?(x)", "**/*.stories.ts?(x)"],
"files": ["app/**/*.ts?(x)", "**/*.stories.ts?(x)", "vite.config.ts"],
"rules": {
"import/no-default-export": "off"
}
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.json.license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)

SPDX-License-Identifier: MIT
10 changes: 2 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
Expand Down Expand Up @@ -35,9 +35,3 @@ jobs:
uses: StanfordBDHG/.github/.github/workflows/npm-test-and-coverage.yml@v2
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
dockercomposetest:
name: Docker Compose & Test
uses: StanfordBDHG/.github/.github/workflows/docker-compose-test.yml@v2
with:
dockerComposeFile: docker-compose-development.yml
testscript: test.sh
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
#
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

name: Deployment

on:
release:
types: [published]
workflow_dispatch:

concurrency:
group: production
cancel-in-progress: false

jobs:
build-and-test:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
permissions:
contents: read
checks: write
actions: read
security-events: write
secrets: inherit
with:
environment: production
publishpackage:
name: Publish Package
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
scope: '@stanfordbdhg'
- name: Clean Install
run: npm ci
- name: Set version
run: npm version ${{ github.event.release.tag_name }}
- name: Build
run: npm run build
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40 changes: 0 additions & 40 deletions .github/workflows/main.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/monthly-markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
Expand Down
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
Expand All @@ -17,12 +17,8 @@
# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/dist

# misc
.DS_Store
Expand Down
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
//
// SPDX-License-Identifier: MIT
//
Expand Down
35 changes: 35 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
//
// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
//
// SPDX-License-Identifier: MIT
//

/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
},
core: {
builder: {
name: '@storybook/builder-vite',
options: {
viteConfigPath: './vite.config.ts',
},
},
},
docs: {},
typescript: {
reactDocgen: 'react-docgen-typescript',
},
}

export default config
Loading

0 comments on commit 7e3bde0

Please sign in to comment.