Skip to content

Commit

Permalink
Migrate to Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
agatemosu committed Dec 28, 2024
1 parent 3cdf343 commit 1128ba6
Show file tree
Hide file tree
Showing 19 changed files with 665 additions and 30 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/static.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
Expand All @@ -31,13 +30,26 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Set up Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
# Upload dist folder
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
12 changes: 4 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tier list creator</title>
<link rel="icon" href="./assets/icon.svg" />
<link rel="stylesheet" href="./styles/main.css" />
<script src="./script.js" type="module"></script>
<link rel="preload" href="./assets/check.svg" as="image" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@simonwep/pickr@1.9.1/dist/themes/monolith.min.css"
/>
<script type="module" src="./src/main.js"></script>
<link rel="icon" href="/icon.svg" />
<link rel="stylesheet" href="./src/main.css" />
<link rel="preload" href="/check.svg" as="image" />
</head>
<body>
<main>
Expand Down
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "tierl",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@simonwep/pickr": "1.9.1",
"sortablejs": "1.15.6"
},
"devDependencies": {
"@types/sortablejs": "1.15.8",
"vite": "6.0.6"
}
}
Loading

0 comments on commit 1128ba6

Please sign in to comment.