tsonic 0.0.19 → 0.0.21
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 +31 -5
- package/bin.js +2 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,20 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript to C# to NativeAOT compiler.
|
|
4
4
|
|
|
5
|
-
This is a convenience wrapper for [@tsonic/cli](https://www.npmjs.com/package/@tsonic/cli).
|
|
6
|
-
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
npm install tsonic
|
|
8
|
+
npm install -g tsonic
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or in a project:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -D tsonic
|
|
11
15
|
```
|
|
12
16
|
|
|
13
17
|
## Usage
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
|
-
|
|
20
|
+
# Initialize a new project (creates tsonic.json, src/App.ts, etc.)
|
|
21
|
+
tsonic project init
|
|
22
|
+
|
|
23
|
+
# Build TypeScript to native binary
|
|
24
|
+
tsonic build src/App.ts
|
|
25
|
+
|
|
26
|
+
# Generate C# only (no compilation)
|
|
27
|
+
tsonic generate src/App.ts
|
|
17
28
|
```
|
|
18
29
|
|
|
30
|
+
If installed as a dev dependency, use `npx`:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx tsonic build src/App.ts
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Requirements
|
|
37
|
+
|
|
38
|
+
- Node.js >= 22.0.0
|
|
39
|
+
- .NET SDK 10.0 or later
|
|
40
|
+
|
|
19
41
|
## Documentation
|
|
20
42
|
|
|
21
|
-
See
|
|
43
|
+
See https://github.com/tsoniclang/tsonic for full documentation.
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|
package/bin.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// Forward to @tsonic/cli
|
|
4
|
-
import { createRequire } from "node:module";
|
|
3
|
+
// Forward to @tsonic/cli.
|
|
5
4
|
import { spawn } from "node:child_process";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
6
|
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
8
8
|
|
|
9
|
-
// Find the real bin from @tsonic/cli
|
|
10
9
|
const realBinPath = require.resolve("@tsonic/cli");
|
|
11
10
|
|
|
12
|
-
// Spawn it with same args
|
|
13
11
|
const child = spawn(process.execPath, [realBinPath, ...process.argv.slice(2)], {
|
|
14
12
|
stdio: "inherit",
|
|
15
13
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsonic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "TypeScript to C# to NativeAOT compiler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tsonic": "./bin.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@tsonic/cli": "0.0.
|
|
10
|
+
"@tsonic/cli": "0.0.21"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"tsonic",
|