Skip to content

Commit

Permalink
Big ol clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Nov 30, 2023
1 parent 903fca6 commit f104258
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 1,476 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: examples
on: [push]
jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sqlc-dev/setup-sqlc@v4
with:
sqlc-version: '1.24.0'
- uses: sqlc-dev/setup-node@v4
- uses: sqlc-dev/setup-bun@v4
- run: bun run src/main.ts
working-directory: examples/bun-postgres
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
run: examples/plugin.wasm examples/sqlc.yaml
cd examples && sqlc-dev generate
.PHONY: generate

src/gen/plugin/codegen_pb.ts: buf.gen.yaml
buf generate --template buf.gen.yaml buf.build/sqlc/sqlc --path plugin/
generate: examples/plugin.wasm examples/sqlc.yaml
cd examples && sqlc-dev generate

# https://github.com/bytecodealliance/javy/releases/tag/v1.2.0
examples/plugin.wasm: out.js
./javy compile out.js -o examples/plugin.wasm

out.js: src/app.ts $(wildcard src/drivers/*.ts) src/gen/plugin/codegen_pb.ts
npx tsc --noEmit
npx esbuild --bundle src/app.ts --tree-shaking=true --format=esm --target=es2020 --outfile=out.js
npx esbuild --bundle src/app.ts --tree-shaking=true --format=esm --target=es2020 --outfile=out.js

src/gen/plugin/codegen_pb.ts: buf.gen.yaml
buf generate --template buf.gen.yaml buf.build/sqlc/sqlc --path plugin/
4 changes: 2 additions & 2 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
src/cloud
node_modules
*.js
*.wasm
*.js
File renamed without changes.
File renamed without changes.
281 changes: 0 additions & 281 deletions examples/bun-pg/src/db/request.json

This file was deleted.

Binary file modified examples/bun-postgres/bun.lockb
Binary file not shown.
Loading

0 comments on commit f104258

Please sign in to comment.