Added ENV for dead-code elimination in production mode
parent
b7ffeec6db
commit
9cbfafe698
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
production: false,
|
||||
development: true,
|
||||
node: false
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
production: true,
|
||||
development: false,
|
||||
node: true
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
production: true,
|
||||
development: false,
|
||||
node: false
|
||||
};
|
@ -0,0 +1,51 @@
|
||||
module.exports = {
|
||||
inputStream: {
|
||||
name: "Live",
|
||||
type: "LiveStream",
|
||||
constraints: {
|
||||
width: 640,
|
||||
height: 480,
|
||||
minAspectRatio: 0,
|
||||
maxAspectRatio: 100,
|
||||
facing: "environment" // or user
|
||||
},
|
||||
area: {
|
||||
top: "0%",
|
||||
right: "0%",
|
||||
left: "0%",
|
||||
bottom: "0%"
|
||||
},
|
||||
singleChannel: false // true: only the red color-channel is read
|
||||
},
|
||||
locate: true,
|
||||
numOfWorkers: 0,
|
||||
decoder: {
|
||||
readers: [
|
||||
'code_128_reader'
|
||||
],
|
||||
debug: {
|
||||
drawBoundingBox: false,
|
||||
showFrequency: false,
|
||||
drawScanline: false,
|
||||
showPattern: false,
|
||||
}
|
||||
},
|
||||
locator: {
|
||||
halfSample: true,
|
||||
patchSize: "medium", // x-small, small, medium, large, x-large
|
||||
debug: {
|
||||
showCanvas: true,
|
||||
showPatches: true,
|
||||
showFoundPatches: false,
|
||||
showSkeleton: false,
|
||||
showLabels: false,
|
||||
showPatchLabels: false,
|
||||
showRemainingPatchLabels: false,
|
||||
boxFromPatches: {
|
||||
showTransformed: false,
|
||||
showTransformedBox: false,
|
||||
showBB: false
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
@ -1,48 +1,12 @@
|
||||
export default {
|
||||
inputStream: {
|
||||
name: "Live",
|
||||
type: "LiveStream",
|
||||
constraints: {
|
||||
width: 640,
|
||||
height: 480,
|
||||
minAspectRatio: 0,
|
||||
maxAspectRatio: 100,
|
||||
facing: "environment" // or user
|
||||
},
|
||||
area: {
|
||||
top: "0%",
|
||||
right: "0%",
|
||||
left: "0%",
|
||||
bottom: "0%"
|
||||
},
|
||||
singleChannel: false // true: only the red color-channel is read
|
||||
},
|
||||
debug: false,
|
||||
locate: true,
|
||||
numOfWorkers: 4,
|
||||
decoder: {
|
||||
drawBoundingBox: false,
|
||||
showFrequency: false,
|
||||
drawScanline: false,
|
||||
showPattern: false,
|
||||
readers: [
|
||||
'code_128_reader'
|
||||
]
|
||||
},
|
||||
locator: {
|
||||
halfSample: true,
|
||||
patchSize: "medium", // x-small, small, medium, large, x-large
|
||||
showCanvas: false,
|
||||
showPatches: false,
|
||||
showFoundPatches: false,
|
||||
showSkeleton: false,
|
||||
showLabels: false,
|
||||
showPatchLabels: false,
|
||||
showRemainingPatchLabels: false,
|
||||
boxFromPatches: {
|
||||
showTransformed: false,
|
||||
showTransformedBox: false,
|
||||
showBB: false
|
||||
}
|
||||
}
|
||||
};
|
||||
let config;
|
||||
|
||||
console.log(ENV);
|
||||
if(ENV.development){
|
||||
config = require('./config.dev.js');
|
||||
} else if (ENV.node) {
|
||||
config = require('./config.node.js');
|
||||
} else {
|
||||
config = require('./config.prod.js');
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
inputStream: {
|
||||
type: "ImageStream",
|
||||
sequence: false,
|
||||
size: 800,
|
||||
area: {
|
||||
top: "0%",
|
||||
right: "0%",
|
||||
left: "0%",
|
||||
bottom: "0%"
|
||||
},
|
||||
singleChannel: false // true: only the red color-channel is read
|
||||
},
|
||||
locate: true,
|
||||
numOfWorkers: 0,
|
||||
decoder: {
|
||||
readers: [
|
||||
'code_128_reader'
|
||||
]
|
||||
},
|
||||
locator: {
|
||||
halfSample: true,
|
||||
patchSize: "medium", // x-small, small, medium, large, x-large
|
||||
}
|
||||
};
|
@ -0,0 +1,31 @@
|
||||
module.exports = {
|
||||
inputStream: {
|
||||
name: "Live",
|
||||
type: "LiveStream",
|
||||
constraints: {
|
||||
width: 640,
|
||||
height: 480,
|
||||
minAspectRatio: 0,
|
||||
maxAspectRatio: 100,
|
||||
facing: "environment" // or user
|
||||
},
|
||||
area: {
|
||||
top: "0%",
|
||||
right: "0%",
|
||||
left: "0%",
|
||||
bottom: "0%"
|
||||
},
|
||||
singleChannel: false // true: only the red color-channel is read
|
||||
},
|
||||
locate: true,
|
||||
numOfWorkers: 4,
|
||||
decoder: {
|
||||
readers: [
|
||||
'code_128_reader'
|
||||
]
|
||||
},
|
||||
locator: {
|
||||
halfSample: true,
|
||||
patchSize: "medium", // x-small, small, medium, large, x-large
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue