mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
Merge pull request #20 from serratus/issue-17
Issue 17: prepare for npm publishing
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
test/
|
||||
example/
|
||||
examples/
|
||||
.sass-cache/
|
||||
node_modules/
|
||||
coverage/
|
||||
.project
|
||||
_site/
|
||||
_includes/
|
||||
.idea/
|
||||
doc/
|
||||
.gitignore
|
||||
+1
-6
@@ -48,18 +48,13 @@ module.exports = function(grunt) {
|
||||
"glMatrixAddon" : {
|
||||
"deps" : ["glMatrix"],
|
||||
"exports" : "glMatrixAddon"
|
||||
},
|
||||
"async": {
|
||||
"deps": [],
|
||||
"exports": "async"
|
||||
}
|
||||
},
|
||||
|
||||
"paths" : {
|
||||
"typedefs" : "typedefs",
|
||||
"glMatrix" : "vendor/glMatrix",
|
||||
"glMatrixAddon" : "glMatrixAddon",
|
||||
"async": "vendor/async"
|
||||
"glMatrixAddon" : "glMatrixAddon"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
//see this AMD call, not the internal modules in
|
||||
//the closure below.
|
||||
define([], factory);
|
||||
} else if (typeof module !== 'undefined') {
|
||||
module.exports = factory();
|
||||
} else {
|
||||
//Browser globals case. Just assign the
|
||||
//result to a property on the global.
|
||||
|
||||
Vendored
+14
-1131
File diff suppressed because it is too large
Load Diff
+9
-5
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "quagga",
|
||||
"version": "0.1.0",
|
||||
"description": "This README would normally document whatever steps are necessary to get your application up and running.",
|
||||
"main": "js/main.js",
|
||||
"version": "0.4.0",
|
||||
"description": "An advanced barcode-scanner written in JavaScript",
|
||||
"main": "dist/quagga.js",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
@@ -26,6 +26,10 @@
|
||||
"scripts": {
|
||||
"test": "karma start"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/serratus/quaggaJS.git"
|
||||
},
|
||||
"author": "Christoph Oberhofer <ch.oberhofer@gmail.com>",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
+12
-7
@@ -1,8 +1,8 @@
|
||||
/* jshint undef: true, unused: true, browser:true, devel: true */
|
||||
/* global define, vec2, importScripts */
|
||||
|
||||
define(["code_128_reader", "ean_reader", "input_stream", "image_wrapper", "barcode_locator", "barcode_decoder", "frame_grabber", "html_utils", "config", "events", "camera_access", "async", "image_debug"],
|
||||
function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, BarcodeDecoder, FrameGrabber, HtmlUtils, _config, Events, CameraAccess, async, ImageDebug) {
|
||||
define(["code_128_reader", "ean_reader", "input_stream", "image_wrapper", "barcode_locator", "barcode_decoder", "frame_grabber", "html_utils", "config", "events", "camera_access", "image_debug"],
|
||||
function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, BarcodeDecoder, FrameGrabber, HtmlUtils, _config, Events, CameraAccess, ImageDebug) {
|
||||
"use strict";
|
||||
|
||||
var _inputStream,
|
||||
@@ -223,14 +223,19 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
|
||||
}
|
||||
|
||||
function initWorkers(cb) {
|
||||
var i;
|
||||
_workerPool = [];
|
||||
|
||||
async.times(_config.numOfWorkers, function(n, next) {
|
||||
initWorker(function(workerThread) {
|
||||
for (i = 0; i < _config.numOfWorkers; i++) {
|
||||
initWorker(workerInitialized);
|
||||
}
|
||||
|
||||
function workerInitialized(workerThread) {
|
||||
_workerPool.push(workerThread);
|
||||
next(null);
|
||||
});
|
||||
}, cb);
|
||||
if (_workerPool.length >= _config.numOfWorkers){
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initWorker(cb) {
|
||||
|
||||
Vendored
-1123
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user