Consolidate all console.log into the @0xproject/utils package
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/react-shared": "^0.0.1",
|
||||
"@0xproject/utils": "^0.4.1",
|
||||
"basscss": "^8.0.3",
|
||||
"compare-versions": "^3.0.1",
|
||||
"lodash": "^4.17.4",
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import { logUtils } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
@@ -16,7 +17,7 @@ export interface CustomEnumProps {
|
||||
export function CustomEnum(props: CustomEnumProps) {
|
||||
const type = props.type;
|
||||
if (!_.startsWith(type.defaultValue, STRING_ENUM_CODE_PREFIX)) {
|
||||
utils.consoleLog('We do not yet support `Variable` types that are not strEnums');
|
||||
logUtils.log('We do not yet support `Variable` types that are not strEnums');
|
||||
return null;
|
||||
}
|
||||
// Remove the prefix and postfix, leaving only the strEnum values without quotes.
|
||||
|
@@ -1,9 +1,4 @@
|
||||
export const utils = {
|
||||
consoleLog(message: string) {
|
||||
/* tslint:disable */
|
||||
console.log(message);
|
||||
/* tslint:enable */
|
||||
},
|
||||
spawnSwitchErr(name: string, value: any) {
|
||||
return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
|
||||
},
|
||||
|
@@ -9,5 +9,5 @@
|
||||
"*": ["node_modules/@types/*", "*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/ts/**/*"]
|
||||
"include": ["./src/ts/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user