Browse Source

Build min version with npm run build

pull/246/head
Jerome Wu 6 years ago
parent
commit
8b56811de7
  1. 3
      dist/README.md
  2. 10
      dist/tesseract.js
  3. 1
      dist/tesseract.min.js
  4. 1
      dist/tesseract.min.js.map
  5. 1
      dist/worker.min.js
  6. 1
      dist/worker.min.js.map
  7. 1787
      package-lock.json
  8. 4
      package.json

3
dist/README.md vendored

@ -1,3 +0,0 @@
# Using Tesseract.JS
<script src='https://cdn.rawgit.com/naptha/tesseract.js/a01d2a2/dist/tesseract.js'></script>

10
dist/tesseract.js vendored

@ -191,9 +191,8 @@ module.exports={
"description": "Pure Javascript Multilingual OCR", "description": "Pure Javascript Multilingual OCR",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" & exit 1",
"start": "watchify src/index.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.dev.js --standalone Tesseract & watchify src/browser/worker.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/worker.dev.js & http-server -p 7355", "start": "watchify src/index.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.dev.js --standalone Tesseract & watchify src/browser/worker.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/worker.dev.js & http-server -p 7355",
"build": "browserify src/index.js -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.js --standalone Tesseract && browserify src/browser/worker.js -t [ babelify --presets [ es2015 ] ] -o dist/worker.js", "build": "browserify src/index.js -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.js --standalone Tesseract && browserify src/browser/worker.js -t [ babelify --presets [ es2015 ] ] -o dist/worker.js && uglifyjs dist/tesseract.js --source-map -o dist/tesseract.min.js && uglifyjs dist/worker.js --source-map -o dist/worker.min.js",
"release": "npm run build && git commit -am 'new release' && git push && git tag `jq -r '.version' package.json` && git push origin --tags && npm publish" "release": "npm run build && git commit -am 'new release' && git push && git tag `jq -r '.version' package.json` && git push origin --tags && npm publish"
}, },
"browser": { "browser": {
@ -208,12 +207,13 @@ module.exports={
"envify": "^3.4.1", "envify": "^3.4.1",
"http-server": "^0.9.0", "http-server": "^0.9.0",
"pako": "^1.0.3", "pako": "^1.0.3",
"uglify-js": "^3.4.9",
"watchify": "^3.7.0" "watchify": "^3.7.0"
}, },
"dependencies": { "dependencies": {
"file-type": "^3.8.0", "file-type": "^3.8.0",
"isomorphic-fetch": "^2.2.1", "isomorphic-fetch": "^2.2.1",
"is-url": "^1.2.2", "is-url": "1.2.2",
"jpeg-js": "^0.2.0", "jpeg-js": "^0.2.0",
"level-js": "^2.2.4", "level-js": "^2.2.4",
"node-fetch": "^1.6.3", "node-fetch": "^1.6.3",
@ -528,14 +528,14 @@ var circularize = require('./common/circularize.js');
var TesseractJob = require('./common/job'); var TesseractJob = require('./common/job');
var version = require('../package.json').version; var version = require('../package.json').version;
function create() { var create = function create() {
var workerOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var workerOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var worker = new TesseractWorker(Object.assign({}, adapter.defaultOptions, workerOptions)); var worker = new TesseractWorker(Object.assign({}, adapter.defaultOptions, workerOptions));
worker.create = create; worker.create = create;
worker.version = version; worker.version = version;
return worker; return worker;
} };
var TesseractWorker = function () { var TesseractWorker = function () {
function TesseractWorker(workerOptions) { function TesseractWorker(workerOptions) {

1
dist/tesseract.min.js vendored

File diff suppressed because one or more lines are too long

1
dist/tesseract.min.js.map vendored

File diff suppressed because one or more lines are too long

1
dist/worker.min.js vendored

File diff suppressed because one or more lines are too long

1
dist/worker.min.js.map vendored

File diff suppressed because one or more lines are too long

1787
package-lock.json generated

File diff suppressed because it is too large Load Diff

4
package.json

@ -4,9 +4,8 @@
"description": "Pure Javascript Multilingual OCR", "description": "Pure Javascript Multilingual OCR",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" & exit 1",
"start": "watchify src/index.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.dev.js --standalone Tesseract & watchify src/browser/worker.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/worker.dev.js & http-server -p 7355", "start": "watchify src/index.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.dev.js --standalone Tesseract & watchify src/browser/worker.js -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/worker.dev.js & http-server -p 7355",
"build": "browserify src/index.js -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.js --standalone Tesseract && browserify src/browser/worker.js -t [ babelify --presets [ es2015 ] ] -o dist/worker.js", "build": "browserify src/index.js -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.js --standalone Tesseract && browserify src/browser/worker.js -t [ babelify --presets [ es2015 ] ] -o dist/worker.js && uglifyjs dist/tesseract.js --source-map -o dist/tesseract.min.js && uglifyjs dist/worker.js --source-map -o dist/worker.min.js",
"release": "npm run build && git commit -am 'new release' && git push && git tag `jq -r '.version' package.json` && git push origin --tags && npm publish" "release": "npm run build && git commit -am 'new release' && git push && git tag `jq -r '.version' package.json` && git push origin --tags && npm publish"
}, },
"browser": { "browser": {
@ -21,6 +20,7 @@
"envify": "^3.4.1", "envify": "^3.4.1",
"http-server": "^0.9.0", "http-server": "^0.9.0",
"pako": "^1.0.3", "pako": "^1.0.3",
"uglify-js": "^3.4.9",
"watchify": "^3.7.0" "watchify": "^3.7.0"
}, },
"dependencies": { "dependencies": {

Loading…
Cancel
Save