Skip to content

Commit

Permalink
convert default config options to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
ericblade committed May 1, 2020
1 parent 956dd6e commit de4e504
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/config/config.dev.js → src/config/config.dev.ts
@@ -1,4 +1,6 @@
module.exports = {
import { QuaggaJSConfigObject } from '../../type-definitions/quagga';

const DevConfig: QuaggaJSConfigObject = {
inputStream: {
name: 'Live',
type: 'LiveStream',
Expand Down Expand Up @@ -49,3 +51,5 @@ module.exports = {
},
},
};

export default DevConfig;
6 changes: 5 additions & 1 deletion src/config/config.node.js → src/config/config.node.ts
@@ -1,4 +1,6 @@
module.exports = {
import { QuaggaJSConfigObject } from "../../type-definitions/quagga";

const NodeConfig: QuaggaJSConfigObject = {
inputStream: {
type: 'ImageStream',
sequence: false,
Expand All @@ -23,3 +25,5 @@ module.exports = {
patchSize: 'medium', // x-small, small, medium, large, x-large
},
};

export default NodeConfig;
6 changes: 5 additions & 1 deletion src/config/config.prod.js → src/config/config.prod.ts
@@ -1,4 +1,6 @@
module.exports = {
import { QuaggaJSConfigObject } from "../../type-definitions/quagga";

const ProdConfig: QuaggaJSConfigObject = {
inputStream: {
name: 'Live',
type: 'LiveStream',
Expand Down Expand Up @@ -29,3 +31,5 @@ module.exports = {
patchSize: 'medium', // x-small, small, medium, large, x-large
},
};

export default ProdConfig;
6 changes: 3 additions & 3 deletions src/config/config.ts
@@ -1,7 +1,7 @@
import { QuaggaBuildEnvironment, QuaggaJSConfigObject } from "../../type-definitions/quagga";
import * as DevConfig from './config.dev';
import * as NodeConfig from './config.node';
import * as ProdConfig from './config.prod';
import DevConfig from './config.dev';
import NodeConfig from './config.node';
import ProdConfig from './config.prod';

declare var ENV: QuaggaBuildEnvironment;

Expand Down

0 comments on commit de4e504

Please sign in to comment.