aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-16 02:44:10 +0800
committerFabio Berger <me@fabioberger.com>2018-03-16 02:44:10 +0800
commit8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6 (patch)
tree831b8d07c48d3700ec5662c7948ebab5e903b1b9 /packages/website/ts/utils
parentf9ad97b978ae4017adca032168ae7963c94e4157 (diff)
parent8137d41ce54b582032770c9b168016ce379711bf (diff)
downloaddexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.tar
dexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.tar.gz
dexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.tar.bz2
dexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.tar.lz
dexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.tar.xz
dexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.tar.zst
dexon-sol-tools-8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6.zip
Merge branch 'development' into addExtraDocs
* development: Add changelog entry about pragma addition Add pragma above command-line script Keep console.log in monorepo-scripts Enable coverage for all other packages with tests Fix parallel coverage results reporting Fix linter issuesx Update CHANGELOGs Consolidate all console.log into the @0xproject/utils package # Conflicts: # packages/deployer/package.json
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/doc_utils.ts5
-rw-r--r--packages/website/ts/utils/error_reporter.ts3
-rw-r--r--packages/website/ts/utils/utils.ts5
3 files changed, 5 insertions, 8 deletions
diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts
index 0686e3e7f..6b3f5f378 100644
--- a/packages/website/ts/utils/doc_utils.ts
+++ b/packages/website/ts/utils/doc_utils.ts
@@ -1,4 +1,5 @@
import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs';
+import { logUtils } from '@0xproject/utils';
import findVersions = require('find-versions');
import * as _ from 'lodash';
import { S3FileObject, VersionToFileName } from 'ts/types';
@@ -20,7 +21,7 @@ export const docUtils = {
if (response.status !== 200) {
// TODO: Show the user an error message when the docs fail to load
const errMsg = await response.text();
- utils.consoleLog(`Failed to load JSON file list: ${response.status} ${errMsg}`);
+ logUtils.log(`Failed to load JSON file list: ${response.status} ${errMsg}`);
throw new Error(errMsg);
}
const responseXML = await response.text();
@@ -43,7 +44,7 @@ export const docUtils = {
if (response.status !== 200) {
// TODO: Show the user an error message when the docs fail to load
const errMsg = await response.text();
- utils.consoleLog(`Failed to load Doc JSON: ${response.status} ${errMsg}`);
+ logUtils.log(`Failed to load Doc JSON: ${response.status} ${errMsg}`);
throw new Error(errMsg);
}
const jsonDocObj = await response.json();
diff --git a/packages/website/ts/utils/error_reporter.ts b/packages/website/ts/utils/error_reporter.ts
index 0bd247c5b..19f563880 100644
--- a/packages/website/ts/utils/error_reporter.ts
+++ b/packages/website/ts/utils/error_reporter.ts
@@ -1,3 +1,4 @@
+import { logUtils } from '@0xproject/utils';
import { Environments } from 'ts/types';
import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
@@ -40,7 +41,7 @@ export const errorReporter = {
return new Promise((resolve, reject) => {
rollbar.error(err, (rollbarErr: Error) => {
if (rollbarErr) {
- utils.consoleLog(`Error reporting to rollbar, ignoring: ${rollbarErr}`);
+ logUtils.log(`Error reporting to rollbar, ignoring: ${rollbarErr}`);
// We never want to reject and cause the app to throw because of rollbar
resolve();
} else {
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index abb2598c3..25d7e449b 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -95,11 +95,6 @@ export const utils = {
};
return order;
},
- consoleLog(message: string) {
- /* tslint:disable */
- console.log(message);
- /* tslint:enable */
- },
async sleepAsync(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
},