From 104780a09c844d7d6e946b6dfd6558210b3da2ff Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Sat, 26 Oct 2024 08:22:31 -0400 Subject: [PATCH] chore: add contribution guide, add setup script --- .github/CONTRIBUTING.md | 30 ++++++++++++++++++ apps/desktop/nuxt.config.ts | 7 ++--- apps/desktop/pages/store/[identifier].vue | 13 ++++---- apps/desktop/plugins/posthog.client.ts | 3 ++ apps/desktop/src-tauri/src/main.rs | 31 +------------------ package.json | 1 + scripts/init-env.ts | 37 +++++++++++++++++++++-- 7 files changed, 78 insertions(+), 44 deletions(-) create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..3cfbca94 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing + +If you are interested in contributing to the project, please read the following guidelines. + +## Development + +### Prerequisites + +- Node.js LTS +- pnpm +- Bun +- Deno +- Rust + +### Setup + +```bash +pnpm run setup +pnpm install +pnpm --filter @kksh/gql build +``` + +### Run Desktop App + +```bash +pnpm --filter @kksh/desktop tauri dev +# or run it within the desktop app directory +cd apps/desktop +pnpm tauri dev +``` diff --git a/apps/desktop/nuxt.config.ts b/apps/desktop/nuxt.config.ts index 8a1e9eeb..a0580ea5 100644 --- a/apps/desktop/nuxt.config.ts +++ b/apps/desktop/nuxt.config.ts @@ -71,11 +71,8 @@ export default defineNuxtConfig({ .describe("SUPABASE_GRAPHQL_ENDPOINT") .parse(process.env.SUPABASE_GRAPHQL_ENDPOINT), isDev: process.env.NODE_ENV === "development", - posthogPublicKey: z - .string() - .describe("POSTHOG_PUBLIC_KEY") - .parse(process.env.POSTHOG_PUBLIC_KEY), - posthogHost: z.string().describe("POSTHOG_HOST").parse(process.env.POSTHOG_HOST) + posthogPublicKey: process.env.POSTHOG_PUBLIC_KEY, + posthogHost: process.env.POSTHOG_HOST } }, colorMode: { diff --git a/apps/desktop/pages/store/[identifier].vue b/apps/desktop/pages/store/[identifier].vue index cc147e90..f71e1b44 100644 --- a/apps/desktop/pages/store/[identifier].vue +++ b/apps/desktop/pages/store/[identifier].vue @@ -132,12 +132,13 @@ async function uninstallExt() { }