Skip to content

Commit

Permalink
Move to vite for building
Browse files Browse the repository at this point in the history
  • Loading branch information
luttje committed Jul 19, 2024
1 parent f1ae63e commit 86a080b
Show file tree
Hide file tree
Showing 55 changed files with 9,038 additions and 17,026 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
47 changes: 40 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,49 @@ name: Publish to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-20.04
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Set up Node
uses: actions/setup-node@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload dist
uses: actions/upload-pages-artifact@v3
with:
path: './dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
32 changes: 25 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,44 @@ on:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

env:
RELEASE_FILE_NAME: 'css-pokemon-gameboy-${{ github.ref }}.zip'

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build the css to dist-release
run: npm run build:css

- name: Zip Release
uses: TheDoctor0/zip-release@0.6.1
uses: TheDoctor0/zip-release@0.7.6
with:
type: 'zip'
filename: 'release.zip'
filename: ${{ env.RELEASE_FILE_NAME }}
path: 'template.html styles'
directory: 'dist'
directory: 'dist-release'

- name: Create Release on GitHub
uses: ncipollo/release-action@v1
with:
artifacts: 'dist/release.zip'
artifacts: 'dist-release/${{ env.RELEASE_FILE_NAME }}'
removeArtifacts: true
body: 'Automatic release created by GitHub Action.'
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
101 changes: 22 additions & 79 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,85 +1,28 @@
# Ignore VSCode user files
.vscode

# Node ignores from https://github.com/github/gitignore/blob/master/Node.gitignore :

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/
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?

# Ignore the dist files that are generated by the build process
dist
dist-release
78 changes: 0 additions & 78 deletions Gruntfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 luttje
Copyright (c) 2024 luttje

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 86a080b

Please sign in to comment.