http-server-rs 0.0.54 → 0.0.56

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
@@ -61,6 +61,9 @@ http-server-rs serve --shared-array-buffer ./public
61
61
  # Automatically transpiles TypeScript to JavaScript and Sass to CSS on request
62
62
  http-server-rs serve --transpile ./public
63
63
 
64
+ # Limit the transpilation worker threads
65
+ http-server-rs serve --transpile --transpile-worker-threads 4 ./public
66
+
64
67
  # Proxy /api to an external backend (quotes are required)
65
68
  http-server-rs serve --proxy "path=/api&target=http://localhost:3000" ./public
66
69
 
@@ -114,6 +117,8 @@ Options:
114
117
  Transpile served files
115
118
  --no-source-maps
116
119
  Don't generate source maps for transpiled files
120
+ --transpile-worker-threads <TRANSPILE_WORKER_THREADS>
121
+ Number of worker threads used for transpilation [default: available parallelism]
117
122
  -w, --watch
118
123
  Watch folder for changes and trigger a browser reload
119
124
  --watch-dir <WATCH_DIR>
@@ -140,6 +145,8 @@ Write your application as if your browser natively supports TypeScript and Sass.
140
145
  http-server-rs serve --transpile .
141
146
  ```
142
147
 
148
+ Transpilation runs on a pool of worker threads per language (one for TypeScript, one for Sass). The pool size defaults to `available_parallelism` and can be set with `--transpile-worker-threads`; values are clamped to a minimum of `1`.
149
+
143
150
  https://github.com/user-attachments/assets/3d1bc313-e898-42bb-8c8f-a8023c41ec35
144
151
 
145
152
  ### Typescript
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-server-rs",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {