Skip to content

Commit

Permalink
Update Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer committed Oct 29, 2023
1 parent ac26173 commit 1d7e915
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": ["next/core-web-vitals", "prettier"],
"plugins": ["prettier"],
"ignorePatterns": [
"**/dist/*.js"
],
"ignorePatterns": ["**/dist/*.js"],
"rules": {
"prettier/prettier": "error"
}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nextjs-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
NEXT_JS_OUTPUT: 'export'
NEXT_JS_BASE_PATH: '/${{ github.event.repository.name }}'
NEXT_JS_IMAGES_UNOPTIMIZED: true
- name: Build Docs
run: npm run docs:ci --if-present
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ next-env.d.ts

# lint
eslint_report.json

# docs
docs
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@ SPDX-License-Identifier: MIT

## How To Use This Template

The template repository contains a template TypeScript Project.
The template repository contains a template for a Next.js project providing automated GitHub Actions and setups for code linting, testing & test coverage report, docker deployments, a docker compose setup, local packages for modular deployment, and documentation generation and deployment.

Follow these steps to customize it to your needs:

1. Rename the TypeScript project.
1. Rename the NextJS project.
2. Modify, add, or remove the local packages found at `/packages/*` to separate code out into smaller modules.
3. Add additional dependencies and edit the project in `/app` and the local Node packages.

## Getting Started

You can run the project using the following command. You will need to install Node.js and npm, e.g., using [homebrew (recommended for macOS)](https://formulae.brew.sh/formula/node) or the official [Node.js installer](https://nodejs.org/en/download).

1. Install All Dependencies

```bash
npm install
```

1. Start the Next.js Application

```bash
npm run dev
```
Expand Down
101 changes: 100 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "typescripttemplate",
"version": "0.1.0",
"license": "MIT",
"description": "Stanford BDHG TypeScript Template",
"description": "Stanford Biodesign Digital Health TypeScript Template",
"keywords": [
"Stanford",
"Biodesign"
Expand All @@ -21,7 +21,9 @@
"lint:fix": "eslint . --fix & prettier --write .",
"lint:ci": "eslint --output-file eslint_report.json --format json .",
"pretest": "npm --prefix packages/example-package run build",
"test": "jest"
"test": "jest",
"docs": "typedoc",
"docs:ci": "typedoc --out ./out/docs --githubPages true"
},
"dependencies": {
"@stanfordbdhg/example-package": "file:../packages/example-package",
Expand All @@ -48,6 +50,7 @@
"postcss": "^8",
"prettier": "^3",
"ts-jest": "^29",
"typedoc": "^0.25",
"typescript": "^5"
}
}
1 change: 0 additions & 1 deletion packages/example-package/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"include": ["src"],
"typedocOptions": {
"$schema": "https://typedoc.org/schema.json",
"includeVersion": true,
"entryPoints": ["src/index.ts"]
}
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules"],
"typedocOptions": {
"entryPoints": ["packages/*"],
"name": "Stanford Biodesign Digital Health TypeScript Template",
"entryPointStrategy": "packages",
"includeVersion": false
}
}

0 comments on commit 1d7e915

Please sign in to comment.