Skip to content

Commit c15f10c

Browse files
init: next.js project with tailwindcss🛠️
0 parents  commit c15f10c

30 files changed

+4303
-0
lines changed

‎.eslintrc.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @james-gates-0212
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
31+
32+
**Smartphone (please complete the following information):**
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
38+
39+
**Additional context**
40+
Add any other context about the problem here.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
4+
name: 'Next.js Bundle Analysis'
5+
6+
on:
7+
pull_request:
8+
push:
9+
branches:
10+
- main # change this if your default branch is named differently
11+
workflow_dispatch:
12+
13+
defaults:
14+
run:
15+
# change this if your nextjs app does not live at the root of the repo
16+
working-directory: ./
17+
18+
permissions:
19+
contents: read # for checkout repository
20+
actions: read # for fetching base branch bundle stats
21+
pull-requests: write # for comments
22+
23+
jobs:
24+
analyze:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Install Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 18
33+
34+
- name: Install dependencies
35+
uses: bahmutov/npm-install@v1
36+
37+
# If pnpm is used, you need to switch the previous step with the following one. pnpm does not create a package-lock.json
38+
# so the step above will fail to pull dependencies
39+
# - uses: pnpm/action-setup@v2
40+
# name: Install pnpm
41+
# id: pnpm-install
42+
# with:
43+
# version: 7
44+
# run_install: true
45+
46+
- name: Restore next build
47+
uses: actions/cache@v4
48+
id: restore-build-cache
49+
env:
50+
cache-name: cache-next-build
51+
with:
52+
# if you use a custom build directory, replace all instances of `.next` in this file with your build directory
53+
# ex: if your app builds to `dist`, replace `.next` with `dist`
54+
path: .next/cache
55+
# change this if you prefer a more strict cache
56+
key: ${{ runner.os }}-build-${{ env.cache-name }}
57+
58+
- name: Build next.js app
59+
# change this if your site requires a custom build command
60+
run: ./node_modules/.bin/next build
61+
62+
# Here's the first place where next-bundle-analysis' own script is used
63+
# This step pulls the raw bundle stats for the current bundle
64+
- name: Analyze bundle
65+
run: npx -p nextjs-bundle-analysis report
66+
67+
- name: Upload bundle
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: bundle
71+
path: .next/analyze/__bundle_analysis.json
72+
73+
- name: Download base branch bundle stats
74+
uses: dawidd6/action-download-artifact@v3
75+
continue-on-error: true
76+
if: success() && github.event.number
77+
with:
78+
workflow: nextjs_bundle_analysis.yml
79+
branch: ${{ github.event.pull_request.base.ref }}
80+
path: .next/analyze/base
81+
82+
# And here's the second place - this runs after we have both the current and
83+
# base branch bundle stats, and will compare them to determine what changed.
84+
# There are two configurable arguments that come from package.json:
85+
#
86+
# - budget: optional, set a budget (bytes) against which size changes are measured
87+
# it's set to 350kb here by default, as informed by the following piece:
88+
# https://infrequently.org/2021/03/the-performance-inequality-gap/
89+
#
90+
# - red-status-percentage: sets the percent size increase where you get a red
91+
# status indicator, defaults to 20%
92+
#
93+
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
94+
# entry in your package.json file.
95+
- name: Compare with base branch bundle
96+
if: success() && github.event.number
97+
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
98+
99+
- name: Get Comment Body
100+
id: get-comment-body
101+
if: success() && github.event.number
102+
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
103+
run: |
104+
echo "body<<EOF" >> $GITHUB_OUTPUT
105+
echo "$(cat .next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_OUTPUT
106+
echo EOF >> $GITHUB_OUTPUT
107+
108+
- name: Find Comment
109+
uses: peter-evans/find-comment@v3
110+
if: success() && github.event.number
111+
id: fc
112+
with:
113+
issue-number: ${{ github.event.number }}
114+
body-includes: '<!-- __NEXTJS_BUNDLE -->'
115+
116+
- name: Create Comment
117+
uses: peter-evans/create-or-update-comment@v4
118+
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
119+
with:
120+
issue-number: ${{ github.event.number }}
121+
body: ${{ steps.get-comment-body.outputs.body }}
122+
123+
- name: Update Comment
124+
uses: peter-evans/create-or-update-comment@v4
125+
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
126+
with:
127+
issue-number: ${{ github.event.number }}
128+
body: ${{ steps.get-comment-body.outputs.body }}
129+
comment-id: ${{ steps.fc.outputs.comment-id }}
130+
edit-mode: replace

‎.gitignore‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

‎.husky/commit-msg‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn commitlint --edit $1

‎.husky/pre-commit‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# yarn test

‎.prettierignore‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ignore artifacts
2+
.DS_Store
3+
.env
4+
.gitignore
5+
.prettierignore
6+
.next
7+
build
8+
dist
9+
node_modules
10+
11+
# Ignore files
12+
*.gif
13+
*.ico
14+
*.jpeg
15+
*.jpg
16+
*.lock
17+
*.png
18+
*.svg
19+
*.txt
20+
*.woff
21+
*.woff2

0 commit comments

Comments
 (0)