09-22-2025 (#7)
All checks were successful
Build / build (push) Successful in 48s
Lint / lint (push) Successful in 13s

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
2025-09-20 04:49:37 +02:00
parent ba72ca8889
commit 1cd70b3ed0
30 changed files with 908 additions and 103 deletions

View File

@@ -0,0 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/latest/schema.json",
"root": false,
"extends": "//",
"files": {
"includes": ["./src/**"]
}
}

View File

@@ -5,12 +5,12 @@
"type": "module",
"scripts": {
"lint:tsc": "tsc --noEmit",
"bun:dev": "NODE_ENV=development bun --hot ./src/entrypoint.bun.ts",
"bun:build": "esbuild ./src/entrypoint.bun.ts --outdir=./dist --bundle --minify --format=esm --sourcemap --platform=node",
"bun:start": "NODE_ENV=production bun ./dist/entrypoint.bun.js",
"node:dev": "NODE_ENV=development tsx --watch ./src/entrypoint.node.ts",
"node:build": "esbuild ./src/entrypoint.node.ts --outdir=./dist --bundle --minify --format=esm --sourcemap --platform=node",
"node:start": "NODE_ENV=production node --enable-source-maps ./dist/entrypoint.node.js",
"lint:biome": "biome lint",
"build": "rollup -c",
"dev:bun": "NODE_ENV=development bun --hot ./src/entrypoint.bun.ts",
"dev:node": "NODE_ENV=development tsx --watch ./src/entrypoint.node.ts",
"start:bun": "NODE_ENV=production bun ./dist/entrypoint.bun.js",
"start:node": "NODE_ENV=production node --enable-source-maps ./dist/entrypoint.node.js",
"clean:dist": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
@@ -29,7 +29,10 @@
"effect": "^3.17.13"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^16.0.1",
"esbuild": "^0.25.9",
"rollup": "^4.52.0",
"rollup-plugin-esbuild": "^6.2.1",
"tsx": "^4.20.5"
}
}

View File

@@ -0,0 +1,28 @@
import { nodeResolve } from "@rollup/plugin-node-resolve"
import path from "node:path"
import url from "node:url"
import { defineConfig } from "rollup"
import esbuild from "rollup-plugin-esbuild"
const __relativeDirname = path.relative(".", url.fileURLToPath(new URL(".", import.meta.url)))
export default defineConfig({
input: {
"entrypoint.bun": path.join(__relativeDirname, "src", "entrypoint.bun.ts"),
"entrypoint.node": path.join(__relativeDirname, "src", "entrypoint.node.ts"),
},
output: {
dir: path.join(__relativeDirname, "dist"),
format: "es",
sourcemap: true,
},
external: id => !/^[./]/.test(id) && !/^@website\//.test(id),
plugins: [
nodeResolve(),
esbuild({ minify: true }),
],
})