fix: update platform support docs for cross-runtime compatibility
- README: Node.js 18+ → Node.js 18+, Deno, and Bun - package.json: add deno:true field - build-distribution.md: consolidate engine/platform sections
This commit is contained in:
@@ -10,7 +10,7 @@ UJSX treats JSX as an intermediate representation for multi-target rendering. Th
|
||||
npm install @alkdev/ujsx
|
||||
```
|
||||
|
||||
Requires Node.js 18+. Dual ESM/CJS output with TypeScript declarations.
|
||||
Works in Node.js 18+, Deno, and Bun. Ships dual ESM/CJS with TypeScript declarations. No Node-specific APIs in core — runs anywhere `@preact/signals-core` and `@alkdev/typebox` do.
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
||||
1
deno.lock
generated
1
deno.lock
generated
@@ -33,6 +33,7 @@
|
||||
],
|
||||
"packageJson": {
|
||||
"dependencies": [
|
||||
"npm:@alkdev/pubsub@0.1",
|
||||
"npm:@alkdev/typebox@~0.34.49",
|
||||
"npm:@preact/signals-core@^1.14.1",
|
||||
"npm:@types/node@22",
|
||||
|
||||
@@ -122,23 +122,11 @@ Preact signals-core is the reactive layer. `ValuePointer` wraps `signal<T>`, `Co
|
||||
|
||||
No runtime dev dependencies. No test framework besides Vitest. No linter configuration (type checking via `tsc --noEmit` serves as the static analysis step).
|
||||
|
||||
## Engine Requirements
|
||||
## Platform Support
|
||||
|
||||
```json
|
||||
"engines": { "node": ">=18.0.0" }
|
||||
```
|
||||
UJSX runs in Node.js 18+, Deno, and Bun. Core has no Node-specific API calls — no `fs`, `path`, `child_process`, or other builtins. `src/core/` and `src/transform/` are fully platform-agnostic.
|
||||
|
||||
Node 18 is the minimum for ESM support, `structuredClone`, and stable `fetch`. UJSX does not use Node-specific APIs in its core module paths — no `fs`, no `path`, no `child_process`. Platform-specific features (file I/O, Node APIs) should go in separate packages.
|
||||
|
||||
## Platform Agnosticism
|
||||
|
||||
UJSX core is platform-agnostic. It runs in:
|
||||
- Node.js 18+
|
||||
- Deno (with npm specifiers)
|
||||
- Bun
|
||||
- Any browser that supports ESM and the `@preact/signals-core` package
|
||||
|
||||
There are no Node-specific API calls in `src/core/` or `src/transform/`. The `src/host/` directory contains host configurations, but these are also platform-agnostic — they define what "create instance" and "update instance" mean for a given target, not how to interact with Node.js APIs.
|
||||
The `engines` field in `package.json` specifies Node as a lower bound for npm consumers. Deno support is provided via `deno.json` with direct source imports.
|
||||
|
||||
## Published Files
|
||||
|
||||
|
||||
@@ -146,5 +146,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"deno": true
|
||||
}
|
||||
Reference in New Issue
Block a user