mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
Fixed node build
This commit is contained in:
Vendored
+14
-9
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
+124
-420
File diff suppressed because one or more lines are too long
@@ -1,6 +1,5 @@
|
||||
let config;
|
||||
|
||||
console.log(ENV);
|
||||
if(ENV.development){
|
||||
config = require('./config.dev.js');
|
||||
} else if (ENV.node) {
|
||||
|
||||
@@ -163,7 +163,7 @@ function boxFromPatches(patches) {
|
||||
vec2.transformMat2(box[j], box[j], transMat);
|
||||
}
|
||||
|
||||
if (ENV.development && _config.development.boxFromPatches.showBB) {
|
||||
if (ENV.development && _config.debug.boxFromPatches.showBB) {
|
||||
ImageDebug.drawPath(box, {x: 0, y: 1}, _canvasContainer.ctx.binary, {color: '#ff0000', lineWidth: 2});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ import ImageDebug from './common/image_debug';
|
||||
import {vec2} from 'gl-matrix';
|
||||
import ResultCollector from './analytics/result_collector';
|
||||
import Config from './config/config';
|
||||
import InputStream from 'input_stream';
|
||||
import FrameGrabber from 'frame_grabber';
|
||||
|
||||
const merge = require('lodash/object/merge');
|
||||
const InputStream = require('./input/input_stream');
|
||||
const FrameGrabber = require('./input/frame_grabber');
|
||||
|
||||
var _inputStream,
|
||||
_framegrabber,
|
||||
|
||||
+3
-2
@@ -16,9 +16,10 @@ module.exports = {
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.jsx'],
|
||||
root: path.resolve(__dirname),
|
||||
alias: {
|
||||
'input_stream$': path.resolve(__dirname, 'src/input/input_stream'),
|
||||
'frame_grabber$': path.resolve(__dirname, 'src/input/frame_grabber')
|
||||
'input_stream$': 'src/input/input_stream',
|
||||
'frame_grabber$': 'src/input/frame_grabber'
|
||||
}
|
||||
},
|
||||
output: {
|
||||
|
||||
@@ -5,9 +5,10 @@ module.exports = require('./webpack.config.js');
|
||||
|
||||
module.exports.resolve = {
|
||||
extensions: ['', '.js', '.jsx'],
|
||||
root: path.resolve(__dirname),
|
||||
alias: {
|
||||
'input_stream$': path.resolve(__dirname, 'lib/input_stream'),
|
||||
'frame_grabber$': path.resolve(__dirname, 'lib/frame_grabber')
|
||||
'input_stream': 'lib/input_stream',
|
||||
'frame_grabber': 'lib/frame_grabber'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,6 +20,10 @@ module.exports.externals = [
|
||||
"ndarray-linear-interpolate"
|
||||
];
|
||||
module.exports.output.libraryTarget = "commonjs2";
|
||||
module.exports.plugins = [];
|
||||
module.exports.plugins = [
|
||||
new webpack.DefinePlugin({
|
||||
ENV: require(path.join(__dirname, './env/', process.env.BUILD_ENV))
|
||||
})
|
||||
];
|
||||
module.exports.output.path = __dirname + '/lib';
|
||||
module.exports.output.filename = 'quagga.js';
|
||||
|
||||
Reference in New Issue
Block a user