http-server-rs 0.0.40 → 0.0.42
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
|
@@ -132,12 +132,12 @@ Options:
|
|
|
132
132
|
Print help
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
##
|
|
135
|
+
## On-The-Fly TypeScript Transpilation
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
directly to the browser without a build step.
|
|
137
|
+
Write your application as if your browser natively supports TypeScript.
|
|
139
138
|
|
|
140
|
-
|
|
139
|
+
The server will on-the-fly transpile TypeScript to JavaScript on request. This allows serving TypeScript sources
|
|
140
|
+
directly to the browser without a build step.
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
143
|
http-server-rs serve --transpile --port 8080 ./testing/transpile/react
|
|
@@ -149,9 +149,11 @@ curl http://localhost:8080/app.tsx
|
|
|
149
149
|
https://github.com/user-attachments/assets/3d1bc313-e898-42bb-8c8f-a8023c41ec35
|
|
150
150
|
|
|
151
151
|
Notes;
|
|
152
|
-
- Use builtin `import` syntax
|
|
153
|
-
-
|
|
154
|
-
-
|
|
152
|
+
- Use builtin `import` syntax
|
|
153
|
+
- Libraries are fetched from a CDN (like [esm.sh](https://esm.sh/#tsx)) or vendored locally (no `npm`)
|
|
154
|
+
- [importmap](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap) is used to map ESM specifiers (e.g. `import 'react'`)
|
|
155
|
+
- Deno is used for type checking
|
|
156
|
+
- Unfortunately, [TypeScript does not support remote declaration files](https://github.com/microsoft/TypeScript/issues/28985). If you want to use tsc you need to install packages using `npm` and configure a `tsconfig.json`.
|
|
155
157
|
- For performance sensitive applications, you'll still probably want to use a bundler for production - but who know, this might be good enough for most use cases
|
|
156
158
|
|
|
157
159
|
## Watch Mode
|
|
Binary file
|
|
Binary file
|
package/http-server-rs-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|