Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Vite #26

Merged
merged 12 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install
- run: npm run build --if-present
- run: npm run test:ci
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- run: pnpm test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
build/
dist/
# Local Netlify folder
.netlify
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v17.4.0
v20.11.1
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/6b0cc0c5-26fb-40e5-a4a9-3e1d893c429b/deploy-status)](https://app.netlify.com/sites/musing-wiles-f46ad5/deploys)

# [runcalculator](https://runner-math.netlify.app/)
calculator for determining time/pace/distance for running

built in loving memory of coolrunning's pace calculator
Calculator for determining time/pace/distance for running

built with react + material ui + typescript
Made in loving memory of coolrunning's pace calculator

Built with React, Material UI, and TypeScript

hosting + CI courtesy of Netlify

![Screenshot 2024-12-19 at 5 13 45 AM](https://github.com/user-attachments/assets/98d5b8fe-f0a1-44df-884a-75e819ade015)

# get started
# Get started

```sh
$ git clone https://github.com/djm158/runcalculator
$ cd runcalculator
$ npm install
$ pnpm install
```

# build

# Build

```sh
$ npm build
$ pnpm build
```

# test
# Test

```sh
$ npm test
$ pnpm test
```

# develop
# Develop

```sh
$ npm start
$ pnpm start
```

# TODO
* keyboard shortcut for clear (esc)
28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
}
);
28 changes: 28 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Run calculator is the best tool to help you pace your next workout or race."
/>
<meta
name="google-site-verification"
content="7_6UZDsQ5XyvqnTBO_nj7ZgV3RzUr5ugsrynoCBCo3I"
/>
<link rel="manifest" href="manifest.json" />
<link rel="shortcut icon" href="favicon.ico" />
<title>Running Calculator</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading
Loading