Skip to content

Commit

Permalink
feat: migrate to shadcn & tw 4 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhanh00 authored Feb 16, 2025
1 parent f0b900d commit 2b7ac53
Show file tree
Hide file tree
Showing 26 changed files with 3,487 additions and 3,779 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ jobs:
echo "Certificate imported."
- name: Check out code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Prepare Tauri
run: |
npm install
npx tauri icon
pnpm install
pnpm tauri icon
- name: Tauri build
uses: tauri-apps/tauri-action@v0
env:
Expand Down
21 changes: 21 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
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 },
],
},
},
)
3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri + React + Typescript</title>
<title>Zcash Vote Auditor</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
Expand Down
Loading

0 comments on commit 2b7ac53

Please sign in to comment.