-
-
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.
feat: refactoring the project in Nuxt
- Loading branch information
1 parent
038b312
commit 71d1277
Showing
43 changed files
with
9,731 additions
and
2,801 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 |
---|---|---|
@@ -1,29 +1,40 @@ | ||
name: Deploy React App to GH pages | ||
name: Build & deploy | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.12] | ||
node-version: [22.10] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- name: 💻 Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm test | ||
- run: npm run build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
- name: 📦 Install dependencies | ||
run: npm ci | ||
|
||
- name: 🏗️ Build static website | ||
run: npm run build:gh | ||
|
||
- name: 🚀 Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
path: .output/public | ||
|
||
- name: 🏁 Deploy to GitHub Pages | ||
id: gh-pages | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
@@ -1,25 +1,24 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
coverage | ||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
# Misc | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example |
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
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,48 @@ | ||
<script setup lang="ts"> | ||
import { hasData, load } from "./libs/storage"; | ||
const app = useMainStore(); | ||
onMounted(() => { | ||
if (hasData()) { | ||
app.setState(load()); | ||
document.querySelector("html")?.setAttribute("data-theme", app.theme); | ||
} | ||
}); | ||
useHead({ | ||
title: "Subscriptions Tracker ⚠️", | ||
meta: [ | ||
{ name: "description", content: "Webapp to keep track on subscriptions fees and have some math done for you." }, | ||
{ name: "theme-color", content: "#ffffff" }, | ||
{ name: "viewport", content: "width=device-width, initial-scale=1.0" }, | ||
{ name: "title", content: "Subscriptions Tracker ⚠️" }, | ||
], | ||
link: [ | ||
{ | ||
rel: "icon", | ||
type: "image/svg+xml", | ||
href: "/favicon.svg", | ||
}, | ||
{ | ||
rel: "icon", | ||
type: "image/png", | ||
sizes: "32x32", | ||
href: "/static/favicons/favicon-32x32.png", | ||
}, | ||
], | ||
htmlAttrs: { | ||
lang: "it-IT", | ||
"data-theme": "light", | ||
// class: document && document.documentElement.classList.contains("dark") ? "dark" : "light", | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-col h-screen"> | ||
<Header /> | ||
<NuxtPage /> | ||
<Footer /> | ||
</div> | ||
</template> |
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
File renamed without changes.
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
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
File renamed without changes.
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
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
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
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
// https://nuxt.com/docs/api/configuration/nuxt-config | ||
export default defineNuxtConfig({ | ||
compatibilityDate: '2024-04-03', | ||
devtools: { enabled: true }, | ||
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss'], | ||
}) |
Oops, something went wrong.