Skip to content

Commit 8bbc62c

Browse files
feat: upgrade to nuxt3 (DeepSourceCorp#678)
1 parent 27305b8 commit 8bbc62c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+298
-11478
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ jobs:
66
test:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Checkout repo
10-
uses: actions/checkout@v4
9+
- name: Checkout repo
10+
uses: actions/checkout@v4
1111

12-
- name: Set up Python 3.12
13-
uses: actions/setup-python@v5
14-
with:
15-
python-version: '3.12'
12+
- name: Set up Python 3.12
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.12'
1616

17-
- name: Install dependencies
18-
run: make pre-build
17+
- name: Install dependencies
18+
run: make pre-build
1919

20-
- name: Run tests for data sanity
21-
run: make test
20+
- name: Run tests for data sanity
21+
run: make test

.github/workflows/cron.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ jobs:
1212
uses: joelwmale/webhook-action@master
1313
with:
1414
url: ${{ secrets.DEPLOY_HOOK_URL }}
15-

.gitignore

Lines changed: 22 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,162 +1,31 @@
1-
# Public dir
2-
public/
3-
resources/
4-
5-
# Node modules
6-
node_modules/
7-
themes/lucy/node_modules/
8-
9-
# Generated configs
10-
cdn_config.toml
11-
12-
# Generated data files
13-
data/generated.json
14-
data/tags.json
15-
content/language/*.md
16-
17-
# Byte-compiled / optimized / DLL files
18-
__pycache__/
19-
*.py[cod]
20-
*$py.class
21-
22-
# C extensions
23-
*.so
24-
25-
# Distribution / packaging
26-
.Python
27-
build/
28-
develop-eggs/
29-
dist/
30-
downloads/
31-
eggs/
32-
.eggs/
33-
lib/
34-
lib64/
35-
parts/
36-
sdist/
37-
var/
38-
wheels/
39-
pip-wheel-metadata/
40-
share/python-wheels/
41-
*.egg-info/
42-
.installed.cfg
43-
*.egg
44-
MANIFEST
45-
46-
# PyInstaller
47-
# Usually these files are written by a python script from a template
48-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
49-
*.manifest
50-
*.spec
51-
52-
# Installer logs
53-
pip-log.txt
54-
pip-delete-this-directory.txt
55-
56-
# Unit test / coverage reports
57-
htmlcov/
58-
.tox/
59-
.nox/
60-
.coverage
61-
.coverage.*
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
626
.cache
63-
nosetests.xml
64-
coverage.xml
65-
*.cover
66-
*.py,cover
67-
.hypothesis/
68-
.pytest_cache/
69-
cover/
7+
dist
708

71-
# Translations
72-
*.mo
73-
*.pot
9+
# Node dependencies
10+
node_modules
7411

75-
# Django stuff:
12+
# Logs
13+
logs
7614
*.log
77-
local_settings.py
78-
db.sqlite3
79-
db.sqlite3-journal
80-
81-
# Flask stuff:
82-
instance/
83-
.webassets-cache
84-
85-
# Scrapy stuff:
86-
.scrapy
87-
88-
# Sphinx documentation
89-
docs/_build/
90-
91-
# PyBuilder
92-
.pybuilder/
93-
target/
94-
95-
# Jupyter Notebook
96-
.ipynb_checkpoints
9715

98-
# IPython
99-
profile_default/
100-
ipython_config.py
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
10120

102-
# pyenv
103-
# For a library or package, you might want to ignore these files since the code is
104-
# intended to run in multiple environments; otherwise, check them in:
105-
# .python-version
106-
107-
# pipenv
108-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
109-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
110-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
111-
# install all needed dependencies.
112-
#Pipfile.lock
113-
114-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
115-
__pypackages__/
116-
117-
# Celery stuff
118-
celerybeat-schedule
119-
celerybeat.pid
120-
121-
# SageMath parsed files
122-
*.sage.py
123-
124-
# Environments
21+
# Local env files
12522
.env
126-
.venv
127-
env/
128-
venv/
129-
ENV/
130-
env.bak/
131-
venv.bak/
132-
133-
# Spyder project settings
134-
.spyderproject
135-
.spyproject
136-
137-
# Rope project settings
138-
.ropeproject
139-
140-
# mkdocs documentation
141-
/site
142-
143-
# mypy
144-
.mypy_cache/
145-
.dmypy.json
146-
dmypy.json
23+
.env.*
24+
!.env.example
14725

148-
# Pyre type checker
149-
.pyre/
26+
__pycache__
15027

151-
# pytype static type analyzer
152-
.pytype/
153-
154-
# Cython debug symbols
155-
cython_debug/
156-
157-
# static files generated from Django application using `collectstatic`
158-
media
159-
160-
.nuxt
161-
162-
static/sw.js
28+
# Generated data files
29+
data/generated.json
30+
data/tags.json
31+
content/language/*.md

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node 20.10.0

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.nuxt
2+
pnpm-lock.yaml
3+
dist
4+
.output
5+
*.json

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"bracketSpacing": true,
7+
"semi": false
8+
}

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.ONESHELL:
22
pre-build:
3-
pip install --upgrade poetry && \
4-
poetry install --no-root && \
5-
yarn
3+
pip install --upgrade poetry
4+
poetry install --no-root
65

76
build:
8-
yarn generate
7+
bun install
8+
bun generate
99

1010
generate:
1111
poetry run python gfi/populate.py
@@ -21,5 +21,6 @@ test:
2121

2222
format:
2323
poetry run ruff format .
24+
bunx prettier --write .
2425

2526
.DEFAULT_GOAL := build

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<a href="https://goodfirstissue.dev" target="_blank">
3-
<img src="static/readme-logo.svg">
3+
<img src="public/readme-logo.svg">
44
</a>
55
</p>
66
<hr>
@@ -49,8 +49,8 @@ $ cp data/tags.sample.json data/tags.json
4949
3. Build the front-end app and start the development server.
5050

5151
```bash
52-
$ yarn # install the dependencies
53-
$ yarn dev -o # start the development server
52+
$ bun install # install the dependencies
53+
$ bun dev # start the development server
5454
```
5555

5656
The app should open in your browser.

bun.lockb

430 KB
Binary file not shown.

components/Banner.vue

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@
1111
</header>
1212
</template>
1313

14-
<script>
14+
<script setup>
15+
import { ref, onMounted } from 'vue'
16+
1517
const BANNER_ACTIVE_TIME = 2000
18+
const bannerActive = ref(true)
1619
17-
export default {
18-
data() {
19-
return {
20-
bannerActive: true
21-
}
22-
},
23-
mounted() {
24-
setTimeout(() => {
25-
this.bannerActive = false
26-
}, BANNER_ACTIVE_TIME)
27-
}
28-
}
20+
onMounted(() => {
21+
setTimeout(() => {
22+
bannerActive.value = false
23+
}, BANNER_ACTIVE_TIME)
24+
})
2925
</script>

components/Navbar.vue

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template>
22
<header class="w-full py-4 border-b border-ink-200 bg-ink-400">
33
<nav class="flex items-center justify-center flex-wrap">
4-
<nuxt-link to="/" class="flex items-center text-gray-700 font-bold">
4+
<NuxtLink to="/" class="flex items-center text-gray-700 font-bold">
55
<img src="~/assets/gfi-logo-white.svg" alt="Good First Issue" class="h-12" />
6-
</nuxt-link>
6+
</NuxtLink>
77
<span v-if="activeTag" class="text-2xl cursor-pointer">
88
<span class="font-normal ml-2 mr-1 text-slate">/</span>
99
<span class="font-semibold text-juniper">{{ activeTag.language }}</span>
@@ -12,21 +12,12 @@
1212
</header>
1313
</template>
1414

15-
<script>
16-
import { find } from 'lodash'
15+
<script setup>
1716
import Tags from '~/data/tags.json'
1817
19-
export default {
20-
props: {
21-
tag: {
22-
type: Object,
23-
required: true
24-
}
25-
},
26-
computed: {
27-
activeTag: function () {
28-
return find(Tags, { slug: this.$route.params.slug })
29-
}
30-
}
31-
}
18+
const route = useRoute()
19+
20+
const activeTag = computed(() => {
21+
return Tags.find(tag => tag.slug === route.params.slug)
22+
})
3223
</script>

0 commit comments

Comments
 (0)