File tree Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Original file line number Diff line number Diff line change 1
- # nut.js (Native UI Toolkit) [ ![ Build Status] ( https://travis-ci.com/nut-tree/nut.js.svg?branch=master )] ( https://travis-ci.com/nut-tree/nut.js ) [ ![ SonarCloud badge] ( https://sonarcloud.io/api/project_badges/measure?project=nut-tree%3Anut.js&metric=alert_status )] ( https://sonarcloud.io/dashboard?id=nut-tree%3Anut.js ) [ ![ SonarCloud Coverage] ( https://sonarcloud.io/api/project_badges/measure?project=nut-tree%3Anut.js&metric=coverage )] ( https://sonarcloud.io/component_measures?id=nut-tree%3Anut.js&metric=coverage ) [ ![ Downloads per month] ( https://img.shields.io/npm/dm/@nut-tree/nut-js )] ( https://www.npmjs.com/package/@nut-tree/nut-js )
1
+ # nut.js (Native UI Toolkit) [ ![ Build Status] ( https://travis-ci.com/nut-tree/nut.js.svg?branch=master )] ( https://travis-ci.com/nut-tree/nut.js ) [ ![ Build status ] ( https://ci.appveyor.com/api/projects/status/iohwxc5t46gcuvby/branch/master?svg=true )] ( https://ci.appveyor.com/project/s1hofmann/nut-js/branch/master ) [ ![ SonarCloud badge] ( https://sonarcloud.io/api/project_badges/measure?project=nut-tree%3Anut.js&metric=alert_status )] ( https://sonarcloud.io/dashboard?id=nut-tree%3Anut.js ) [ ![ SonarCloud Coverage] ( https://sonarcloud.io/api/project_badges/measure?project=nut-tree%3Anut.js&metric=coverage )] ( https://sonarcloud.io/component_measures?id=nut-tree%3Anut.js&metric=coverage ) [ ![ Downloads per month] ( https://img.shields.io/npm/dm/@nut-tree/nut-js )] ( https://www.npmjs.com/package/@nut-tree/nut-js )
2
2
<p align =" center " >
3
3
Native UI testing / automation with node.js
4
4
</p >
@@ -157,6 +157,48 @@ yarn add @nut-tree/nut-js
157
157
158
158
will install nut.js and its required dependencies.
159
159
160
+ ### Usage with Electron
161
+
162
+ ` nut.js ` in combination with Electron requires bindings built for use with Electron.
163
+ ` nut.js ` does provide such bindings and e.g. [ electron-rebuild] ( https://www.npmjs.com/package/electron-rebuild ) makes installation a breeze.
164
+
165
+ Besides installing ` nut.js ` via
166
+
167
+ ``` bash
168
+ npm i @nut-tree/nut-js
169
+ ```
170
+
171
+ or
172
+
173
+ ``` bash
174
+ yarn add @nut-tree/nut-js
175
+ ```
176
+
177
+ we also install ` electron-rebuild ` as a ` devDependency ` :
178
+
179
+ ``` bash
180
+ npm i -D electron-rebuild
181
+ ```
182
+
183
+ or
184
+
185
+ ``` bash
186
+ yarn add -D electron-rebuild
187
+ ```
188
+
189
+ Next, we add a ` rebuild ` script to our ` package.json ` :
190
+
191
+ ``` json
192
+ {
193
+ "scripts" : {
194
+ "start" : " electron app.js" ,
195
+ "rebuild" : " electron-rebuild"
196
+ }
197
+ }
198
+ ```
199
+
200
+ Now all we have to do is run ` npm run rebuild ` and ` electron-rebuild ` will fetch the appropriate bindings for our Electron version.
201
+ Currently ` nut.js ` provides bindings for all ABI version to work with Electron v4.x up to 8.x
160
202
161
203
# Examples
162
204
You can’t perform that action at this time.
0 commit comments