bun-dev-server 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bunServeConfig.ts CHANGED
@@ -7,6 +7,7 @@ export interface BunDevServerConfig extends Partial<BunDevServerSocketConfig> {
7
7
  enableTypeScriptWatch?: boolean;
8
8
  writeManifest?: boolean;
9
9
  manifestName?: string;
10
+ reloadOnChange?: boolean;
10
11
  /**
11
12
  * The path to the directory to serve files from.
12
13
  * Takes precedence over `buildConfig.outdir`.
package/index.ts CHANGED
@@ -158,6 +158,9 @@ export async function startBunDevServer(serverConfig: BunDevServerConfig) {
158
158
  if (finalConfig.writeManifest) {
159
159
  writeManifest(output, dst, finalConfig.manifestName);
160
160
  }
161
+ if(finalConfig.reloadOnChange) {
162
+ bunServer.publish("message", JSON.stringify({ type: "reload" }));
163
+ }
161
164
 
162
165
  }
163
166
 
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "type": "git",
7
7
  "url": "https://github.com/SPWizard01/bun-dev-server"
8
8
  },
9
- "version": "0.0.6",
9
+ "version": "0.0.8",
10
10
  "module": "index.ts",
11
11
  "type": "module",
12
12
  "license": "MIT",
@@ -14,13 +14,13 @@
14
14
  "serve": "bun --hot ./serve.ts"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/bun": "^1.1.11",
18
- "@types/ejs": "^3.1.5"
17
+ "@types/bun": "latest"
19
18
  },
20
19
  "peerDependencies": {
21
20
  "typescript": "^5.6.3"
22
21
  },
23
22
  "dependencies": {
24
- "ejs": "^3.1.10"
23
+ "ejs": "^3.1.10",
24
+ "@types/ejs": "^3.1.5"
25
25
  }
26
26
  }