Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ npm run wiki
npm run wiki-less
# Builds the Wiki CSS file on Windows
npm run wiki-less-win
# Launches the game server locally on localhost:4400
# Launches dev server on 0.0.0.0:8000 with auto-build on change
npm run serve
# Deploys the game to GitHub Pages on Linux (requires forking)
npm run deploy
Expand Down
25 changes: 25 additions & 0 deletions dev.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as esbuild from "esbuild"

let ctx = await esbuild.context({
logLevel: "info",
bundle: true,
minify: true,

// with multiple entrypoints, .js extension is appended
// automatically, and outdir is required
entryPoints: [
{ in: "./src/main.js", out: "evolve/main" },
{ in: "./src/wiki/wiki.js", out: "wiki/wiki" },
],
outdir: "."
})


try {
await ctx.serve({ port: 8000, servedir: "." })
await ctx.watch()
} catch (err) {
ctx.dispose()
console.error("Error:", err.message)
process.exit(1)
}
Loading