Tsonic.Nodejs
1.0.2
dotnet add package Tsonic.Nodejs --version 1.0.2
NuGet\Install-Package Tsonic.Nodejs -Version 1.0.2
<PackageReference Include="Tsonic.Nodejs" Version="1.0.2" />
<PackageVersion Include="Tsonic.Nodejs" Version="1.0.2" />
<PackageReference Include="Tsonic.Nodejs" />
paket add Tsonic.Nodejs --version 1.0.2
#r "nuget: Tsonic.Nodejs, 1.0.2"
#:package Tsonic.Nodejs@1.0.2
#addin nuget:?package=Tsonic.Nodejs&version=1.0.2
#tool nuget:?package=Tsonic.Nodejs&version=1.0.2
nodejs-clr
nodejs-clr is a .NET library that provides Node-style APIs (filesystem, path, crypto, networking, etc.) for Tsonic projects.
It is Node-inspired (familiar ergonomics), but it is not Node.js itself and it is not an exact replica of the Node standard library.
For Tsonic Users
Install and enable the bindings package:
# new project
tsonic init
tsonic add npm @tsonic/nodejs
# existing project
tsonic add npm @tsonic/nodejs
Then import Node-style modules from @tsonic/nodejs/index.js:
import { console, fs, path } from "@tsonic/nodejs/index.js";
export function main(): void {
console.log(path.join("a", "b", "c"));
console.log(fs.readFileSync("./README.md", "utf-8"));
}
Some namespaces are emitted as separate ESM entry points (for example nodejs.Http) and are imported via a subpath:
import { http } from "@tsonic/nodejs/nodejs.Http.js";
Documentation:
docs/README.md- https://tsonic.org/nodejs/
For Contributors
Build:
dotnet build
If dotnet build fails with "Build FAILED" but no errors (some sandboxed environments block MSBuild node sockets), try:
dotnet build -- -maxcpucount:1
Test:
dotnet test
The @tsonic/nodejs package is generated from the compiled assembly via tsbindgen.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- BouncyCastle.Cryptography (>= 2.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.