diff --git a/.gitignore b/.gitignore index c589c424..02a2cb1a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ pnpm-lock.yaml private past-* output +dist diff --git a/bun.lockb b/bun.lockb index 569990d6..c99a879b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/flake.nix b/flake.nix index 2db4ddf7..df188a78 100644 --- a/flake.nix +++ b/flake.nix @@ -3,20 +3,13 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; }; - outputs = - inputs@{ nixpkgs, flake-parts, ... }: + outputs = inputs@{ nixpkgs, flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = nixpkgs.lib.platforms.all; - perSystem = - { pkgs, ... }: - { - devShells.default = pkgs.mkShell { - packages = [ - pkgs.bun - pkgs.nodejs - ]; - }; - # TODO: Package LA using Nix - }; + perSystem = { pkgs, ... }: { + devShells.default = + pkgs.mkShell { packages = [ pkgs.bun pkgs.nodejs ]; }; + # TODO: Package LA using Nix + }; }; } diff --git a/package.json b/package.json index 70c25964..476ce0c5 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,33 @@ { - "name": "learn-anything", - "scripts": { - "dev": "bun web", - "web": "cd web && bun dev", - "web:build": "bun run --filter '*' build", - "cli": "bun run --watch cli/run.ts", - "seed": "bun --watch cli/seed.ts" - }, - "workspaces": [ - "web" - ], - "dependencies": { - "jazz-nodejs": "^0.7.34", - "react-icons": "^5.3.0" - }, - "devDependencies": { - "bun-types": "^1.1.26" - }, - "prettier": { - "plugins": [ - "prettier-plugin-tailwindcss" - ], - "useTabs": true, - "semi": false, - "trailingComma": "none", - "printWidth": 120, - "arrowParens": "avoid" - }, - "license": "MIT" + "name": "learn-anything", + "scripts": { + "dev": "bun web", + "web": "cd web && bun dev", + "app": "tauri dev", + "web:build": "bun run --filter '*' build", + "cli": "bun run --watch cli/run.ts", + "seed": "bun --watch cli/seed.ts" + }, + "workspaces": [ + "web" + ], + "dependencies": { + "jazz-nodejs": "^0.7.34", + "react-icons": "^5.3.0" + }, + "devDependencies": { + "bun-types": "^1.1.26", + "@tauri-apps/cli": "^1.6.0" + }, + "prettier": { + "plugins": [ + "prettier-plugin-tailwindcss" + ], + "useTabs": true, + "semi": false, + "trailingComma": "none", + "printWidth": 120, + "arrowParens": "avoid" + }, + "license": "MIT" } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d25b1696..1511fe04 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,8 +1,8 @@ { "$schema": "..\\node_modules/@tauri-apps/cli\\schema.json", "build": { - "beforeBuildCommand": "npm run next-build", - "beforeDevCommand": "npm run next dev", + "beforeBuildCommand": "cd web && bun run next-build", + "beforeDevCommand": "cd web && bun run next dev", "devPath": "http://localhost:3000", "distDir": "../dist" }, diff --git a/web/next.config.mjs b/web/next.config.mjs index b73fd13f..f46939fa 100644 --- a/web/next.config.mjs +++ b/web/next.config.mjs @@ -1,6 +1,6 @@ // TODO: somehow there should be dynamic config for tauri/website // one way is perhaps via env variable like below -const TAURI_DEV = false +const TAURI_DEV = true /** @type {import('next').NextConfig} */ const nextConfig = { diff --git a/web/tsconfig.json b/web/tsconfig.json index 07d2560d..77a81a64 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -1,26 +1,41 @@ { - "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "types/**/*.d.ts"], - "exclude": ["node_modules"] + "compilerOptions": { + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": [ + "./*" + ] + } + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "types/**/*.d.ts", + "../dist/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }