@t8/serve 0.1.22 → 0.1.23

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
@@ -9,7 +9,7 @@ Use cases:
9
9
  ## CLI
10
10
 
11
11
  ```sh
12
- npx @t8/serve [url|port] [*] [app_dir] [...assets_dirs] [-b [bundle_input_path] [bundle_output_path]]
12
+ npx @t8/serve [url|port] [*] [app_dir] [...assets_dirs] [-b [bundle_input_path] [bundle_output_path] [bundle_output_dir]]
13
13
  # * = SPA mode: serve all unmatched paths as "/"
14
14
 
15
15
  npx @t8/serve 3000 app
package/dist/run.cjs CHANGED
@@ -132,8 +132,9 @@ async function run() {
132
132
  else {
133
133
  dirs = args.slice(1, bundleFlagIndex);
134
134
  bundle2 = {
135
- input: args[bundleFlagIndex + 1],
136
- output: args[bundleFlagIndex + 2]
135
+ input: args[bundleFlagIndex + 1] || void 0,
136
+ output: args[bundleFlagIndex + 2] || void 0,
137
+ dir: args[bundleFlagIndex + 3] || void 0
137
138
  };
138
139
  }
139
140
  await serve({
package/dist/run.mjs CHANGED
@@ -131,8 +131,9 @@ async function run() {
131
131
  else {
132
132
  dirs = args.slice(1, bundleFlagIndex);
133
133
  bundle2 = {
134
- input: args[bundleFlagIndex + 1],
135
- output: args[bundleFlagIndex + 2]
134
+ input: args[bundleFlagIndex + 1] || void 0,
135
+ output: args[bundleFlagIndex + 2] || void 0,
136
+ dir: args[bundleFlagIndex + 3] || void 0
136
137
  };
137
138
  }
138
139
  await serve({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/serve",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Simple static file server + bundler, primarily for demo apps and tests, manual or automated",
5
5
  "keywords": [
6
6
  "node",
@@ -4,17 +4,17 @@ export type BundleConfig = {
4
4
  *
5
5
  * @defaultValue "dist"
6
6
  */
7
- dir?: string;
7
+ dir?: string | undefined;
8
8
  /**
9
9
  * Input path relative to the server config `path`.
10
10
  *
11
11
  * @defaultValue "index.ts"
12
12
  */
13
- input?: string;
13
+ input?: string | undefined;
14
14
  /**
15
15
  * Output path relative to the bundle config `dir`.
16
16
  *
17
17
  * @defaultValue "index.js"
18
18
  */
19
- output?: string;
19
+ output?: string | undefined;
20
20
  };
package/src/run.ts CHANGED
@@ -21,8 +21,9 @@ async function run() {
21
21
  else {
22
22
  dirs = args.slice(1, bundleFlagIndex);
23
23
  bundle = {
24
- input: args[bundleFlagIndex + 1],
25
- output: args[bundleFlagIndex + 2],
24
+ input: args[bundleFlagIndex + 1] || undefined,
25
+ output: args[bundleFlagIndex + 2] || undefined,
26
+ dir: args[bundleFlagIndex + 3] || undefined,
26
27
  };
27
28
  }
28
29