This commit is contained in:
Nikita
2024-08-27 16:39:58 +03:00
parent 5526df6c53
commit 03ffc6a190
7 changed files with 80 additions and 69 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ pnpm-lock.yaml
private private
past-* past-*
output output
dist

BIN
bun.lockb

Binary file not shown.

View File

@@ -3,19 +3,12 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
}; };
outputs = outputs = inputs@{ nixpkgs, flake-parts, ... }:
inputs@{ nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.platforms.all; systems = nixpkgs.lib.platforms.all;
perSystem = perSystem = { pkgs, ... }: {
{ pkgs, ... }: devShells.default =
{ pkgs.mkShell { packages = [ pkgs.bun pkgs.nodejs ]; };
devShells.default = pkgs.mkShell {
packages = [
pkgs.bun
pkgs.nodejs
];
};
# TODO: Package LA using Nix # TODO: Package LA using Nix
}; };
}; };

View File

@@ -3,6 +3,7 @@
"scripts": { "scripts": {
"dev": "bun web", "dev": "bun web",
"web": "cd web && bun dev", "web": "cd web && bun dev",
"app": "tauri dev",
"web:build": "bun run --filter '*' build", "web:build": "bun run --filter '*' build",
"cli": "bun run --watch cli/run.ts", "cli": "bun run --watch cli/run.ts",
"seed": "bun --watch cli/seed.ts" "seed": "bun --watch cli/seed.ts"
@@ -15,7 +16,8 @@
"react-icons": "^5.3.0" "react-icons": "^5.3.0"
}, },
"devDependencies": { "devDependencies": {
"bun-types": "^1.1.26" "bun-types": "^1.1.26",
"@tauri-apps/cli": "^1.6.0"
}, },
"prettier": { "prettier": {
"plugins": [ "plugins": [

View File

@@ -1,8 +1,8 @@
{ {
"$schema": "..\\node_modules/@tauri-apps/cli\\schema.json", "$schema": "..\\node_modules/@tauri-apps/cli\\schema.json",
"build": { "build": {
"beforeBuildCommand": "npm run next-build", "beforeBuildCommand": "cd web && bun run next-build",
"beforeDevCommand": "npm run next dev", "beforeDevCommand": "cd web && bun run next dev",
"devPath": "http://localhost:3000", "devPath": "http://localhost:3000",
"distDir": "../dist" "distDir": "../dist"
}, },

View File

@@ -1,6 +1,6 @@
// TODO: somehow there should be dynamic config for tauri/website // TODO: somehow there should be dynamic config for tauri/website
// one way is perhaps via env variable like below // one way is perhaps via env variable like below
const TAURI_DEV = false const TAURI_DEV = true
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {

View File

@@ -1,6 +1,10 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@@ -18,9 +22,20 @@
} }
], ],
"paths": { "paths": {
"@/*": ["./*"] "@/*": [
"./*"
]
} }
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "types/**/*.d.ts"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"types/**/*.d.ts",
"../dist/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }