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
@@ -21,7 +21,7 @@ but additionally gives you the possibility to navigate the screen based on image
21
21
22
22
# Sample
23
23
24
-
The following snippet shows a valid NUT example (on macOS)
24
+
The following snippet shows a valid `nut.js` example (on macOS)
25
25
26
26
```js
27
27
"use strict";
@@ -61,6 +61,7 @@ In order to use these pre-compiled bindings, certain runtime conditions have to
61
61
## Prerequisites
62
62
63
63
This section lists runtime requirements for `nut.js` on the respective target platform.
64
+
`nut.js` is built and tested against node 10 and later as well as Electron 4 and later, so in order to use `nut.js` please make sure to use one of these versions.
64
65
65
66
#### Windows
66
67
@@ -155,8 +156,74 @@ or
155
156
yarn add @nut-tree/nut-js
156
157
```
157
158
158
-
will install nut.js and its required dependencies.
159
+
will install `nut.js` and its required dependencies.
159
160
161
+
### Snapshot releases
162
+
163
+
`nut.js` also provides snapshot releases which allows to test upcoming features.
164
+
165
+
Running
166
+
167
+
```bash
168
+
npm i @nut-tree/nut-js@next
169
+
```
170
+
171
+
or
172
+
173
+
```bash
174
+
yarn add @nut-tree/nut-js@next
175
+
```
176
+
177
+
will install the most recent development release of `nut.js`.
178
+
179
+
**Attention**: While snapshot releases are great to work with upcoming features before a new stable release, it is still a snapshot release.
180
+
Please bear in mind that things might change and / or break on snapshot releases, so it is not recommended using them in production.
181
+
182
+
### Usage with Electron
183
+
184
+
`nut.js` in combination with Electron requires bindings built for use with Electron.
185
+
`nut.js` does provide such bindings and e.g. [electron-rebuild](https://www.npmjs.com/package/electron-rebuild) makes installation a breeze.
186
+
187
+
Besides installing `nut.js` via
188
+
189
+
```bash
190
+
npm i @nut-tree/nut-js
191
+
```
192
+
193
+
or
194
+
195
+
```bash
196
+
yarn add @nut-tree/nut-js
197
+
```
198
+
199
+
we also install `electron-rebuild` as a `devDependency`:
200
+
201
+
```bash
202
+
npm i -D electron-rebuild
203
+
```
204
+
205
+
or
206
+
207
+
```bash
208
+
yarn add -D electron-rebuild
209
+
```
210
+
211
+
Next, we add a `rebuild` script to our `package.json`:
212
+
213
+
```json
214
+
{
215
+
...
216
+
"scripts": {
217
+
...
218
+
"start": "electron app.js",
219
+
"rebuild": "electron-rebuild"
220
+
},
221
+
...,
222
+
}
223
+
```
224
+
225
+
Now all we have to do is run `npm run rebuild` and `electron-rebuild` will fetch the appropriate bindings for our Electron version.
226
+
Currently `nut.js` provides bindings for all ABI version to work with Electron v4.x up to 8.x
0 commit comments