Skip to content

Commit

Permalink
add vite
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Harris committed Sep 6, 2024
1 parent 5b74bfc commit 9f3d95a
Show file tree
Hide file tree
Showing 25 changed files with 5,603 additions and 211 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # Use Node.js version 20

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm run build

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
96 changes: 34 additions & 62 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,69 +1,41 @@
# Node modules
node_modules/

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

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# 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 (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

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

# node-waf configuration
.lock-wscript

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

# Dependency directories
node_modules/

# 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
pnpm-debug.log*

# Vite build output
dist/
public/assets/
public/*.js
public/*.css
public/*.png
public/*.ico
public/*.webmanifest
public/index.html
!public/*.svg

# Local environment files
.env

# dataconnect generated files
.dataconnect
.env.local
.env.*.local

# Editor directories and files
.idea/
.vscode/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# MacOS files
.DS_Store

# Windows files
Thumbs.d
Binary file removed client/assets/favicon.ico
Binary file not shown.
Binary file removed client/assets/icons/icon-192x192.png
Binary file not shown.
Binary file removed client/assets/icons/icon-512x512.png
Binary file not shown.
21 changes: 0 additions & 21 deletions client/assets/manifest.json

This file was deleted.

47 changes: 0 additions & 47 deletions client/main.js

This file was deleted.

36 changes: 0 additions & 36 deletions client/service-worker.js

This file was deleted.

42 changes: 30 additions & 12 deletions client/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@

<head>
<title>GitHelm</title>
<meta charset="UTF-8" />
<meta name="theme-color" content="#51cbee">
<link rel="icon" href="/favicon.ico" sizes="48x48">
<link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png">

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="src/style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css"
integrity="sha384-HtMZLkYo+pR5/u7zCzXxMJP6QoNnQJt1qkHM0EaOPvGDIzaVZbmYr/TlvUZ/sKAg" crossorigin="anonymous">
<link rel="manifest" href="assets/manifest.json">
<script defer type="module" src="main.js"></script>
<script defer type="module" src="src/main.ts"></script>
</head>

<body class="h-full text-white flex flex-col bg-gray-900">
<main class="flex-1 p-5">
<body class="h-full text-white flex flex-col bg-gray-900">
<main id="app" class="flex-1 p-5">
<h1 class="text-4xl font-bold text-center mb-5">GitHelm</h1>
<div id="login-container" class="flex justify-center mb-5">
<button id="github-login"
Expand All @@ -26,7 +28,7 @@ <h1 class="text-4xl font-bold text-center mb-5">GitHelm</h1>
Logout
</button>
</div>

<div id="authorized">
<div id="tabs" class="flex justify-center mb-4 md:hidden">
<button id="tab-pull-requests" class="tab-button active">Pull Requests</button>
Expand All @@ -50,11 +52,27 @@ <h2 class="text-xl font-bold mb-4">Actions</h2>
</section>
</div>
</div>
</main>
<footer class="p-4 bg-gray-800 flex justify-between items-center">
<p class="text-sm hover:underline" target="_blank">Made with ❤️ by <a href="https://github.com/steven-harris">Steven Harris</a></p>
<a href="https://www.flaticon.com/free-icons/rudder" title="rudder icons" class="hover:underline" target="_blank"></a>Rudder icons created by Flat Icons </a>
<footer class="p-4 bg-gray-800 flex justify-between items-center">
<p class="text-sm hover:underline" target="_blank">Made with ❤️ by <a href="https://github.com/steven-harris">Steven
Harris</a></p>
<a href="https://www.flaticon.com/free-icons/rudder" title="rudder icons" class="hover:underline"
target="_blank"></a>Rudder icons created by Flat Icons </a>
</footer>
<div id="pwa-toast" role="alert" aria-labelledby="toast-message">
<div class="message">
<span id="toast-message"></span>
</div>
<div class="buttons">
<button id="pwa-refresh" type="button">
Reload
</button>
<button id="pwa-close" type="button">
Close
</button>
</div>
</div>
</main>

</body>

</html>
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "githelm",
"version": "1.0.0",
"description": "",
"main": "src/main.js",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build && pwa-assets-generator",
"preview": "vite preview",
"serve": "vite preview"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Steven-Harris/githelm.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Steven-Harris/githelm/issues"
},
"homepage": "https://githelm.com",
"resolutions": {
"sharp": "0.32.6",
"sharp-ico": "0.1.5"
},
"dependencies": {
"firebase": "^10.13.1"
},
"devDependencies": {
"@types/node": "^22.5.4",
"@vite-pwa/assets-generator": "^0.2.6",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "^5.5.4",
"vite": "^5.4.3",
"vite-plugin-pwa": "^0.20.0",
"workbox-window": "^7.1.0"
}
}
Loading

0 comments on commit 9f3d95a

Please sign in to comment.