Browse Source

Upgrade tesseract.js-core to fix issue

feature/aio v2.0.0-alpha.6
Jerome Wu 6 years ago
parent
commit
794a17472a
  1. 2
      README.md
  2. 4
      docs/local-installation.md
  3. 6
      package-lock.json
  4. 2
      package.json
  5. 2
      src/browser/index.js

2
README.md

@ -39,7 +39,7 @@ Tesseract.js works with a `<script>` tag via local copy or CDN, with webpack via
You can simply include Tesseract.js with a CDN like this: You can simply include Tesseract.js with a CDN like this:
```html ```html
<script src='https://unpkg.com/tesseract.js@v2.0.0-alpha.5/dist/tesseract.min.js'></script> <script src='https://unpkg.com/tesseract.js@v2.0.0-alpha.6/dist/tesseract.min.js'></script>
``` ```
After including your scripts, the `Tesseract` variable will be defined globally! After including your scripts, the `Tesseract` variable will be defined globally!

4
docs/local-installation.md

@ -10,9 +10,9 @@ In Node.js environment, the only path you may want to customize is languages/lan
```javascript ```javascript
const worker = Tesseract.TesseractWorker({ const worker = Tesseract.TesseractWorker({
workerPath: 'https://unpkg.com/tesseract.js@v2.0.0-alpha.5/dist/worker.min.js', workerPath: 'https://unpkg.com/tesseract.js@v2.0.0-alpha.6/dist/worker.min.js',
langPath: 'https://tessdata.projectnaptha.com/4.0.0', langPath: 'https://tessdata.projectnaptha.com/4.0.0',
corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.9/tesseract-core.wasm.js', corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.10/tesseract-core.wasm.js',
}); });
``` ```

6
package-lock.json generated

@ -7141,9 +7141,9 @@
} }
}, },
"tesseract.js-core": { "tesseract.js-core": {
"version": "2.0.0-beta.9", "version": "2.0.0-beta.10",
"resolved": "https://registry.npmjs.org/tesseract.js-core/-/tesseract.js-core-2.0.0-beta.9.tgz", "resolved": "https://registry.npmjs.org/tesseract.js-core/-/tesseract.js-core-2.0.0-beta.10.tgz",
"integrity": "sha512-W6r+H7ahm/X8hd97xQ0i67qILXIjklPd4VL1xJ7FeDbIQueCybl1GmVsnjUq64uBCnEtI1VUnbHFX2hzbidcVw==" "integrity": "sha512-QmNgMA9m5ES5uMTqpOAPysrUA80vUx/6WKQlfkK3zhOeAgqv8DjwwcDv9tQv2TgRzOQ+LFKrJn94Y2rw5b2IGw=="
}, },
"tesseract.js-utils": { "tesseract.js-utils": {
"version": "1.0.0-beta.5", "version": "1.0.0-beta.5",

2
package.json

@ -47,7 +47,7 @@
"is-url": "1.2.2", "is-url": "1.2.2",
"node-fetch": "^2.3.0", "node-fetch": "^2.3.0",
"resolve-url": "^0.2.1", "resolve-url": "^0.2.1",
"tesseract.js-core": "^2.0.0-beta.9", "tesseract.js-core": "^2.0.0-beta.10",
"tesseract.js-utils": "^1.0.0-beta.5" "tesseract.js-utils": "^1.0.0-beta.5"
}, },
"repository": { "repository": {

2
src/browser/index.js

@ -102,7 +102,7 @@ exports.defaultOptions = {
* If browser doesn't support WebAssembly, * If browser doesn't support WebAssembly,
* load ASM version instead * load ASM version instead
*/ */
corePath: `https://unpkg.com/tesseract.js-core@v2.0.0-beta.9/tesseract-core.${typeof WebAssembly === 'object' ? 'wasm' : 'asm'}.js`, corePath: `https://unpkg.com/tesseract.js-core@v2.0.0-beta.10/tesseract-core.${typeof WebAssembly === 'object' ? 'wasm' : 'asm'}.js`,
}; };
/** /**

Loading…
Cancel
Save