Skip to content

Commit 64eccd6

Browse files
committed
0.3.1: adds instructions about using with electron
1 parent 35a4aa8 commit 64eccd6

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,19 @@ Then npm install
3434
```sh
3535
$ npm install penteract@latest # the version using nan
3636
$ npm install penteract@n-api # the version using n-api
37+
```
38+
39+
### Used with Electron
3740

41+
Due to the limitation of node native modules, if you want to use `penteract` with electron, add a `.npmrc` file to the root of your electron project, before `npm install`:
42+
43+
```ini
44+
runtime = electron
45+
; the version of the local electron,
46+
; use `npm ls electron` to figure out the version
47+
target = 1.7.5
48+
target_arch = x64
49+
disturl = https://atom.io/download/atom-shell
3850
```
3951

4052
## Usage
@@ -54,13 +66,6 @@ fs.readFile(filepath).then(recognize).then(console.log)
5466
// 'penteract'
5567
```
5668

57-
### From a Readable Stream
58-
59-
```js
60-
const stream = fs.createReadStream(filepath)
61-
recognize(stream).then(console.log)
62-
```
63-
6469
### Recognize a Local Image File
6570

6671
```js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "penteract",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"main": "lib/index.js",
55
"module": "src/index.js",
66
"devDependencies": {

0 commit comments

Comments
 (0)