Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:zerodays/next-template into feat/…
Browse files Browse the repository at this point in the history
…env-validation
  • Loading branch information
zigapk committed Nov 15, 2023
2 parents 4a43388 + 72ce256 commit 54479f9
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 7,368 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 18
cache: 'yarn'
- name: Install Dependencies
run: yarn add --dev ts-node
run_install: true
- name: Check Localization
run: |
yarn i18n
pnpm i18n
19 changes: 6 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,28 @@ name: Lint
on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
run_install: true
- uses: zerodays/action-infisical@v1
with:
infisical_token: ${{ secrets.INFISICAL_TOKEN }}
environment: "staging"
- name: Lint
run: |
source .env && yarn tsc
source .env && pnpm tsc
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
run_install: true
- name: Typecheck
run: |
yarn tsc
pnpm tsc
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
infisical_token: ${{ secrets.INFISICAL_TOKEN }}
environment: "staging"
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
run_install: true
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
package-manager: yarn
package-manager: pnpm
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
pnpm-error.log*

# local env files
.env*.local
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev"
"command": "pnpm dev"
},
{
"name": "Next.js: debug client-side",
Expand All @@ -17,7 +17,7 @@
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev",
"command": "pnpm dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ This is template to bootstrap new Next.js projects. It includes everything you n
1. Use this template to create new Next.js project.

```
yarn create next-app -e https://github.com/zerodays/next-template
pnpm create next-app -e https://github.com/zerodays/next-template
```

2. After that, install dependencies:

```bash
yarn install
pnpm install
```

3. Start the development server:

```bash
yarn dev
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Expand All @@ -29,26 +29,26 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
Lint your code and typecheck it:

```bash
yarn lint
yarn tsc
pnpm lint
pnpm tsc
```

Run unit tests:

```bash
yarn test
pnpm test
```

Check if all localizations keys match between languages:

```bash
yarn i18n
pnpm i18n
```

Analyze bundle size:

```bash
ANALYZE=true yarn build
ANALYZE=true pnpm build
```

## What's included?
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "next-template",
"version": "0.1.0",
"private": true,
"packageManager": "[email protected]",
"scripts": {
"dev": "infisical run -- next dev",
"build": "next build",
Expand All @@ -16,7 +17,7 @@
"dependencies": {
"@hookform/resolvers": "^3.1.0",
"@next/bundle-analyzer": "^14.0.0",
"@sentry/nextjs": "7.76.0",
"@sentry/nextjs": "7.77.0",
"@t3-oss/env-nextjs": "^0.7.1",
"autoprefixer": "10.4.14",
"next": "^14.0.0",
Expand Down
Loading

0 comments on commit 54479f9

Please sign in to comment.