-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1017ee5
Showing
40 changed files
with
12,127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# EditorConfig is awesome: https://editorconfig.org/ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "plugin:prettier/recommended"], | ||
"overrides": [ | ||
// Configuration for testing (Jest) | ||
{ | ||
"files": ["**/*.test.ts", "**/*.test.tsx"], | ||
"env": { "jest/globals": true }, | ||
"plugins": ["jest", "jest-formatting", "testing-library", "jest-dom"], | ||
"extends": [ | ||
"plugin:jest/recommended", | ||
"plugin:jest-formatting/recommended", | ||
"plugin:testing-library/react", | ||
"plugin:jest-dom/recommended" | ||
] | ||
}, | ||
// Configuration for e2e testing (Playwright) | ||
{ | ||
"files": ["**/*.spec.ts"], | ||
"extends": ["plugin:playwright/recommended"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Bug report 🐛 | ||
description: Create a bug report for Next.js Boilerplate. | ||
labels: ['waiting for maintainer'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: Thanks for contributing by creating an issue! ❤️. | ||
- type: checkboxes | ||
attributes: | ||
label: Latest version | ||
description: We roll bug fixes, performance enhancements, and other improvements into new releases. | ||
options: | ||
- label: I have tested the latest version | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: 🕹 Steps to reproduce | ||
description: | | ||
**⚠️ Issues that we can't reproduce can't be fixed.** | ||
Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. | ||
value: | | ||
Link to live example: (required) | ||
Steps: | ||
1. | ||
2. | ||
3. | ||
- type: textarea | ||
attributes: | ||
label: 😯 Current behavior | ||
description: Describe what happens instead of the expected behavior. | ||
- type: textarea | ||
attributes: | ||
label: 🤔 Expected behavior | ||
description: Describe what should happen. | ||
- type: textarea | ||
attributes: | ||
label: 🔦 Context | ||
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world. | ||
- type: textarea | ||
attributes: | ||
label: 🌎 Your environment | ||
description: Run `npx next info` and post the results. If you encounter issues with TypeScript please include the used tsconfig. | ||
value: | | ||
<details> | ||
<summary><code>npx next info</code></summary> | ||
``` | ||
Don't forget to mention which browser you used. | ||
Output from `npx next info` goes here. | ||
``` | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Feature request 💄 | ||
description: Suggest a new idea for Next.js Boilerplate. | ||
labels: ['waiting for maintainer'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: Thanks for contributing by creating an issue! ❤️. | ||
- type: checkboxes | ||
attributes: | ||
label: Latest version | ||
description: We roll bug fixes, performance enhancements, and other improvements into new releases. | ||
options: | ||
- label: I have tested the latest version | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: 💡 Description | ||
description: Describe how it should work. | ||
- type: textarea | ||
attributes: | ||
label: 🛠️ Proposed solution | ||
description: Describe a possible solution or approach to implement the feature. | ||
- type: textarea | ||
attributes: | ||
label: 🌟 Motivation | ||
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- Thanks so much for your PR, your contribution is appreciated! ♥️ --> | ||
|
||
- [ ] I have followed (at least) the [PR section of the contributing guide](https://github.com/vicasas/next.js-boilerplate/blob/HEAD/CONTRIBUTING.md#sending-a-pull-request). | ||
|
||
<!-- Please provide a brief description of the changes introduced by this PR --> | ||
|
||
<!-- If this pull request closes an issue, please mention the issue number below --> | ||
|
||
Closes # <!-- Github issue # here --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build packages | ||
run: npm run build | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-artifacts | ||
path: .next/ | ||
retention-days: 1 | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm test -- --coverage | ||
|
||
- name: Upload Jest report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: coverage-report | ||
path: coverage/ | ||
retention-days: 1 | ||
|
||
e2e: | ||
name: Playwright | ||
needs: build | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Download build artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build-artifacts | ||
path: .next/ | ||
|
||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
|
||
- name: Run Playwright tests | ||
run: npx playwright test | ||
|
||
- name: Upload Playwright Report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 1 | ||
|
||
eslint: | ||
name: ESLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run ESLint | ||
run: npm run lint | ||
|
||
format: | ||
name: Prettier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run prettier | ||
run: npm run format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npm run lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"experimentalTernaries": true, | ||
"semi": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"editorconfig.editorconfig", | ||
"gruntfuggly.todo-tree", | ||
"ms-playwright.playwright", | ||
"github.vscode-github-actions", | ||
"yoavbls.pretty-ts-errors" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"todo-tree.general.tags": [ | ||
"BUG", // Used to identify bugs in the code. | ||
"HACK", // Used to indicate temporary solutions. | ||
"FIXME", // Used to mark code that needs fixing. | ||
"TODO", // Used for pending tasks. | ||
"XXX", // Used for critical or risky points in the code. | ||
"[ ]", // Used for tasks to be done. | ||
"[X]" // Used for completed tasks. | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. |
Oops, something went wrong.