@t8/serve 0.1.31 → 0.1.32

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.
Files changed (2) hide show
  1. package/README.md +30 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ Simple static file server + bundler, primarily for demo apps and tests, manual o
10
10
  ## CLI
11
11
 
12
12
  ```sh
13
- npx @t8/serve [url|port] [*] [app_dir] [...assets_dirs] [-b [bundle_input_path] [bundle_output_path] [bundle_output_dir]]
13
+ npx @t8/serve [url|port] [*] [app_dir] [...assets_dirs] [-b [bundle_input_path] [bundle_output_path] [bundle_output_dir]] [--watch]
14
14
  # * = SPA mode: serve all unmatched paths as "/"
15
15
 
16
16
  npx @t8/serve 3000 app
@@ -101,6 +101,35 @@ webServer: {
101
101
 
102
102
  </details>
103
103
 
104
+ <details>
105
+ <summary>Example 3 (index.html)</summary>
106
+
107
+ ```
108
+ /app
109
+ - src
110
+ - index.ts
111
+ - index.css
112
+ - index.html
113
+ contains <script src="dist/index.js"></script>
114
+ contains <link rel="stylesheet" href="index.css">
115
+ ```
116
+
117
+ ```
118
+ // /app/package.json
119
+ {
120
+ "name": "app",
121
+ "scripts": {
122
+ "start": "npx @t8/serve 80 . -b src/index.ts --watch"
123
+ }
124
+ }
125
+ ```
126
+
127
+ ```sh
128
+ npm start
129
+ ```
130
+
131
+ </details>
132
+
104
133
  ## Code
105
134
 
106
135
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/serve",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "Simple static file server + bundler, primarily for demo apps and tests, manual or automated",
5
5
  "keywords": [
6
6
  "node",