Skip to content

Commit

Permalink
feat: make minimal for bun script repository template
Browse files Browse the repository at this point in the history
  • Loading branch information
ndxbn committed Oct 28, 2024
1 parent 368cad2 commit f6bd507
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 66 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM oven/bun:alpine@sha256:3dc101cc42433f8a470da07701441afdb1aab4c6d056a291eb405e348c5a5c37

COPY tsconfig.prod.json ./
COPY bun.prod.toml ./bun.toml
COPY server.ts cli.ts ./
COPY tsconfig.json ./
COPY src/ ./
COPY package.json bun.lockb ./

RUN bun install --production --frozen-lockfile
ENTRYPOINT ["bun"]
CMD ["run", "start"]
CMD ["--version"]
2 changes: 0 additions & 2 deletions bun.prod.toml

This file was deleted.

2 changes: 0 additions & 2 deletions cli.ts

This file was deleted.

33 changes: 0 additions & 33 deletions docs/README.md

This file was deleted.

1 change: 0 additions & 1 deletion index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions main.test.ts

This file was deleted.

16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
{
"private": true,
"name": "bun",
"module": "index.ts",
"type": "module",
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@tsconfig/bun": "1.0.7",
"@tsconfig/strictest": "2.0.5",
"@types/bun": "latest"
"@types/bun": "latest",
"lefthook": "1.8.1"
},
"peerDependencies": {
"typescript": "^5.0.0"
"typescript": "5.0.0"
},
"scripts": {
"cli": "bun cli.ts",
"start": "bun server.ts",
"fmt": "biome check --write --unsafe",
"docker:action-lint": "docker run --rm -v $(pwd):/repo --workdir /repo rhysd/actionlint:latest -color"
},
"bin": "cli.ts",
"private": true,
"type": "module",
"dependencies": {
"lefthook": "^1.8.1"
}
}
1 change: 0 additions & 1 deletion server.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/index.ts

This file was deleted.

3 changes: 3 additions & 0 deletions src/main.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from "bun:test";

test.todo("main test", () => {});
12 changes: 12 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function main(): Promise<void> {
return Promise.resolve();
}

main()
.then(() => {
process.exit(0);
})
.catch((error) => {
console.error(error);
process.exit(1);
});
3 changes: 0 additions & 3 deletions tsconfig.prod.json

This file was deleted.

0 comments on commit f6bd507

Please sign in to comment.