Skip to content

Commit

Permalink
Update to modern tooling, react, node, vite, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
davepeck committed Feb 27, 2024
1 parent 4005b88 commit 5df8be0
Show file tree
Hide file tree
Showing 23 changed files with 2,516 additions and 3,886 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
14 changes: 7 additions & 7 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install node 16
uses: actions/setup-node@v2
- name: Install node 20
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"

- name: Cache node assets
id: cache-node
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
key: ${{ runner.os }}-nodefun-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-nodefun-
- name: Install node dependencies
if: steps.cache-node.outputs.cache-hit != 'true'
Expand Down
111 changes: 13 additions & 98 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,104 +4,19 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# 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
*.lcov

# 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/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# 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 / generate output
.nuxt
node_modules
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# ParcelJS -- first time I've ever used this bundler
.parcel-cache/
dist-ssr
*.local

# Editor directories and files
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 0 additions & 1 deletion .sassrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 16.14.1
nodejs 20.11.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🐱 And 🐶 Food

Version `0.0.1` by `Ellie` and Daddy aka `Dave Peck <davepeck@gmail.com>`.
Version `0.1.0` by `Ellie` and Daddy aka `Dave Peck <davepeck@gmail.com>`.

### What's this?

Expand Down
14 changes: 7 additions & 7 deletions src/index.html → index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<!DOCTYPE html>

<html>

<head>
<title>The Cat Food Game</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="normalize.css" />
<link rel="stylesheet" href="index.scss" />
<script type="module" src="index.tsx"></script>
<meta charset="utf-8" />
<meta property="og:title" content="The Cat Food Game" />
<meta property="og:type" content="website" />
<meta property="og:image" content="./img/cat-food-game-screen-shot.png" />
<meta property="og:image" content="/img/cat-food-game-screen-shot.png" />
<meta property="og:url" content="https://food.cats-and-dogs.club/" />
<meta property="og:description" content="Help the 🐱 push its food over the bowls. But don't get stuck!" />
<meta property="og:site_name" content="The Cat Food Game" />
<meta name="twitter:card" content="summary" />
</head>

<body>
<div id="app"></div>
<noscript> Sorry, but The Cat Food Game requires javascript. </noscript>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<noscript>Sorry, but The Cat Food Game requires javascript.</noscript>
</body>

</html>
</html>
Loading

0 comments on commit 5df8be0

Please sign in to comment.