You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.en.md
+15-37Lines changed: 15 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ English | [简体中文](./README.md)
11
11
- 💪 Multi-arch support: Supports major operating systems and CPU architectures
12
12
- 🔧 Ready to use: No compilation needed, supports multiple package managers
13
13
14
-
> [!WARNING]
14
+
> [!WARNING]
15
15
> Currently only tested in Windows Node.js environment. Compatibility with other environments (Linux, macOS, etc.) needs to be verified by users. Feedback is welcome if you encounter any issues.
16
16
17
17
## Installation
@@ -88,49 +88,27 @@ This project is open-sourced under the MIT License. Thanks to the contributions
88
88
## Usage Example
89
89
90
90
```typescript
91
-
import*asosfrom'node:os'
92
-
import*asptyfrom'@karinjs/node-pty'
93
-
94
-
asyncfunction run () {
95
-
// Optional: Check and ensure binary compatibility with current environment
This package supports all original APIs from [@homebridge/node-pty-prebuilt-multiarch](https://github.com/homebridge/node-pty-prebuilt-multiarch).
124
-
125
-
### Extended API
126
-
127
-
We've added the following new API on top of the original ones:
128
-
129
-
#### init()
130
-
131
-
The `init()` method checks if the prebuilt binary is compatible with the current Node.js/Electron environment. This method is optional and is mainly useful in the following scenarios:
132
-
133
-
- After switching Node.js or Electron versions, to verify compatibility
134
-
- When you need to reinstall binaries compatible with the current environment
135
-
136
-
> Tip: If you don't want to call the init() method, you can also directly run `npx pty` to reinstall binaries compatible with the current environment.
0 commit comments