Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix live reload #359

Open
wants to merge 10 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions build/esbuild-server.ts

This file was deleted.

13 changes: 13 additions & 0 deletions build/esbuild-watch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import esbuild from "esbuild";
import { esBuildContext } from "./esbuild-build";

async function watch() {
const ctx = await esbuild.context(esBuildContext);
await ctx.watch();
console.log("Watching...");
}

// The following expression MUST NOT be awaited.
void watch().catch((err) => {
console.error("Error watching:", err);
});
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
"node": "20.10.0"
},
"scripts": {
"start": "run-s start:sign serve",
"watch": "nodemon -e ts,tsx --exec yarn start",
"watch:ui": "nodemon -e ts,tsx --exec yarn start:ui",
"start": "run-s start:sign serve:watch",
"serve:watch": "run-p serve watch",
"serve": "npx wrangler pages dev static --port 8080",
"watch": "tsx build/esbuild-watch.ts",
"format": "run-s format:lint format:prettier format:cspell",
"build": "run-s utils:build",
"start:ui": "tsx build/esbuild-server.ts",
"start:sign": "tsx scripts/typescript/generate-permit2-url.ts",
"serve": "npx wrangler pages dev static --port 8080",
"utils:build": "tsx build/esbuild-build.ts",
"utils:get-invalidate-params": "forge script --via-ir scripts/solidity/GetInvalidateNonceParams.s.sol",
"format:lint": "eslint --fix .",
Expand Down Expand Up @@ -83,7 +82,6 @@
"knip": "^5.0.1",
"lint-staged": "^15.2.2",
"msw": "^2.5.2",
"nodemon": "^3.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
"ts-jest": "29.1.2",
Expand Down
Loading
Loading