Skip to content

Commit 35056f5

Browse files
authored
Merge pull request #2 from hack4impact-calpoly/develop
Template updates
2 parents 16f228b + f59ae3e commit 35056f5

File tree

17 files changed

+2522
-996
lines changed

17 files changed

+2522
-996
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
This file was deleted.

.env.local.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# create local copy of this file and rename to .env.local
2+
# make sure to add .env.local to .gitignore!!
3+
MONGO_URI={mongo-uri-here}

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"extends": ["next/core-web-vitals", "prettier"]
2+
"parser": "@typescript-eslint/parser",
3+
"extends": ["next/core-web-vitals", "prettier"],
4+
"plugins": ["prettier"],
5+
"rules": {
6+
"prettier/prettier": "error"
7+
}
38
}

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ci
2+
3+
# Controls when the workflow will run
4+
on:
5+
push:
6+
branches: ["main", "develop"]
7+
pull_request:
8+
branches: ["main", "develop"]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# Use matrix strategy to test multiple Node.js versions
21+
strategy:
22+
matrix:
23+
node-version: [18.x, 20.x, 22.x]
24+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
25+
26+
# Steps represent a sequence of tasks that will be executed as part of the job
27+
steps:
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v4
30+
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
36+
- name: Install dependencies
37+
run: npm install
38+
39+
- name: Dry-run build
40+
run: npm run build
41+
env:
42+
# These env variables must be set in the repository's secrets
43+
# - Settings -> Secrets and variables -> New repository secret
44+
MONGO_URI: ${{ secrets.MONGO_URI }}
45+
# Add additional environment variables here
46+
47+
- name: Run tests
48+
run: npm test

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.lintstagedrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": "eslint --fix",
3+
"*.{js,jsx,ts,tsx,css,md,json}": "prettier --write"
4+
}

docs/template-features.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ This template uses Next.js version 14.0.0. The following lists what is configure
1010
6. Import aliasing. See paths in `tsconfig.json` for predefined aliases
1111
7. Template documentation to fill in
1212
8. Two branches called `develop` and `main` (if you selected copy branches when creating from template)
13+
9. Issue and Pull Request templates. Modify them in the `.github` folder
14+
10. Some common GitHub tags
15+
11. Pre-commit linting hook with Husky and lint-staged
16+
12. Continuous integration with GitHub Actions
1317

14-
Last updated 10/27/23
18+
Last updated 10/17/2024

0 commit comments

Comments
 (0)