Skip to content

Commit

Permalink
added github workflow, moved drizzle files to src/contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
d3rpp committed Aug 1, 2024
1 parent 2dbf129 commit d737285
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 140 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: lint-and-format
run-name: ${{ github.actor }} is pushing code
on: [push]
jobs:
check-formatting:
name: "Run Prettier"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@4
- uses: oven-sh/bun@v2
- run: bun install
- run: bun fmt:check
lint:
name: "Run ESLint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@4
- uses: oven-sh/bun@v2
- run: bun install
- run: bun lint
122 changes: 0 additions & 122 deletions devenv.lock

This file was deleted.

6 changes: 5 additions & 1 deletion drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{"version":"7","dialect":"sqlite","entries":[]}
{
"version": "7",
"dialect": "sqlite",
"entries": []
}
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",

"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",

"lint": "eslint .",

"fmt": "prettier --write .",
"fmt:check": "prettier --check .",

"generate": "drizzle-kit generate --dialect sqlite --schema ./src/schema.ts",
"migrate": "bun ./src/migrate.ts"
"generate": "drizzle-kit generate --dialect sqlite --schema ./src/contrib/schema.ts",
"migrate": "bun ./src/contrib/migrate.ts"
},
"devDependencies": {
"@sveltejs/kit": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/migrate.ts → src/contrib/migrate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { migrate } from "drizzle-orm/bun-sqlite/migrator";

import { DB } from "./lib/server/db";
import { DB } from "../lib/server/db";

await migrate(DB, { migrationsFolder: "./drizzle" });
17 changes: 17 additions & 0 deletions src/contrib/schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// import {
// type InferSelectModel,
// type InferInsertModel,
// sql
// } from "drizzle-orm";

// import {
// blob,
// sqliteTable,
// text,
// real,
// numeric,
// integer,
// foreignKey,
// } from "drizzle-orm/sqlite-core";

export {}
1 change: 1 addition & 0 deletions src/lib/drizzle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "../contrib/schema";
10 changes: 0 additions & 10 deletions src/schema.ts

This file was deleted.

0 comments on commit d737285

Please sign in to comment.