ezbun 0.1.1 → 0.1.3

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/README.md CHANGED
@@ -18,12 +18,25 @@ bun add -D ezbun
18
18
 
19
19
  ## Usage
20
20
 
21
- Add a script to your `package.json`:
21
+ Without direct installation with `bunx`:
22
+
23
+ ```bash
24
+ bunx ezbun
25
+ ```
26
+
27
+ Installed into your project:
28
+
29
+ ```bash
30
+ bun ezbun
31
+ ```
32
+
33
+ Tip. you can add a script to your `package.json`:
22
34
 
23
35
  ```json
24
36
  {
25
37
  "scripts": {
26
- "dev": "ezbun"
38
+ "dev": "ezbun --watch", // with hot reloading
39
+ "start": "ezbun"
27
40
  }
28
41
  }
29
42
  ```
@@ -34,23 +47,17 @@ Then run:
34
47
  bun dev
35
48
  ```
36
49
 
37
- Or run directly with `bunx`:
38
-
39
- ```bash
40
- bunx ezbun
41
- ```
42
-
43
50
  ### Watch Mode
44
51
 
45
- You can run scripts in watch mode by passing the `--watch` flag:
52
+ You can run scripts in watch mode (hot reloading) by passing the `--watch` flag:
46
53
 
47
54
  ```bash
48
- bun dev --watch
55
+ bun ezbun --watch
49
56
  ```
50
57
 
51
58
  ## Configuration
52
59
 
53
- Create a `ezbun.config.ts` file in your project root to customize behavior:
60
+ Create an optional `ezbun.config.ts` file in your project root to customize behavior:
54
61
 
55
62
  ```ts
56
63
  import { defineConfig } from "ezbun";
@@ -86,13 +93,13 @@ export default defineEnv({
86
93
  2. When you run a script via `ezbun`, it will:
87
94
  - Validate `process.env` against your schema.
88
95
  - Print helpful error messages if validation fails.
89
- - Automatically generate/update `env.d.ts` for global type definitions.
96
+ - Automatically generate `env.d.ts` for global type definitions.
90
97
 
91
98
  Now you can use `process.env` with full type safety in your code!
92
99
 
93
100
  ```ts
94
- // src/index.ts
95
- console.log(process.env.PORT); // typed as number
101
+ /** typed as `string` not `string | undefined` */
102
+ console.log(process.env.API_KEY);
96
103
  ```
97
104
 
98
105
  ## License
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":""}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ export declare const run: () => Promise<never>;
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,GAAG,sBA8Ef,CAAC"}