aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-14 09:06:02 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-14 09:13:48 +0800
commitc8a8b851d8e0622559f71843a206a0e6e601cd83 (patch)
tree143e238a68005fdb0e0d82c6750ea890fec4021c /packages/react-docs
parentc2f8858aabad2355e09ba65e900202b7c4edec5e (diff)
downloaddexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.tar
dexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.tar.gz
dexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.tar.bz2
dexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.tar.lz
dexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.tar.xz
dexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.tar.zst
dexon-sol-tools-c8a8b851d8e0622559f71843a206a0e6e601cd83.zip
Consolidate all console.log into the @0xproject/utils package
Diffstat (limited to 'packages/react-docs')
-rw-r--r--packages/react-docs/package.json1
-rw-r--r--packages/react-docs/src/ts/components/custom_enum.tsx3
-rw-r--r--packages/react-docs/src/ts/utils/utils.ts5
-rw-r--r--packages/react-docs/tsconfig.json2
4 files changed, 4 insertions, 7 deletions
diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json
index eb76fe47e..5690366d9 100644
--- a/packages/react-docs/package.json
+++ b/packages/react-docs/package.json
@@ -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",
diff --git a/packages/react-docs/src/ts/components/custom_enum.tsx b/packages/react-docs/src/ts/components/custom_enum.tsx
index deb33ff1d..1fe55eedc 100644
--- a/packages/react-docs/src/ts/components/custom_enum.tsx
+++ b/packages/react-docs/src/ts/components/custom_enum.tsx
@@ -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.
diff --git a/packages/react-docs/src/ts/utils/utils.ts b/packages/react-docs/src/ts/utils/utils.ts
index 8e1a80a44..f8c1fefff 100644
--- a/packages/react-docs/src/ts/utils/utils.ts
+++ b/packages/react-docs/src/ts/utils/utils.ts
@@ -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}`);
},
diff --git a/packages/react-docs/tsconfig.json b/packages/react-docs/tsconfig.json
index 44055a037..ee715a452 100644
--- a/packages/react-docs/tsconfig.json
+++ b/packages/react-docs/tsconfig.json
@@ -9,5 +9,5 @@
"*": ["node_modules/@types/*", "*"]
}
},
- "include": ["./src/ts/**/*"]
+ "include": ["./src/ts/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
}