aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-04-03 21:19:38 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-04-04 16:56:32 +0800
commit249bf0163d8ee71b7329fd58b72e554c0324279c (patch)
tree5bfb30b082236bd089e35186220bdb02913ba128 /packages/monorepo-scripts
parent674e56cea69fe96ddd0071d3c4c5b5ea8ae299bf (diff)
downloaddexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar
dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.gz
dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.bz2
dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.lz
dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.xz
dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.zst
dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.zip
Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/src/find_unused_dependencies.ts16
1 files changed, 4 insertions, 12 deletions
diff --git a/packages/monorepo-scripts/src/find_unused_dependencies.ts b/packages/monorepo-scripts/src/find_unused_dependencies.ts
index 374cba2e3..bfc38044c 100644
--- a/packages/monorepo-scripts/src/find_unused_dependencies.ts
+++ b/packages/monorepo-scripts/src/find_unused_dependencies.ts
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-import * as depcheck from 'depcheck';
+import * as depcheckAsync from 'depcheck';
import * as fs from 'fs';
import lernaGetPackages = require('lerna-get-packages');
import * as _ from 'lodash';
@@ -23,9 +23,9 @@ const IGNORE_PACKAGES = ['@0xproject/deployer'];
utils.log(`Checking ${lernaPackage.package.name} for unused deps. This might take a while...`);
const configs = {};
- const result = await depcheckAsync(lernaPackage.location, configs);
- if (!_.isEmpty(result.dependencies)) {
- _.each(result.dependencies, dep => {
+ const { dependencies } = await depcheckAsync(lernaPackage.location, configs);
+ if (!_.isEmpty(dependencies)) {
+ _.each(dependencies, dep => {
utils.log(dep);
});
}
@@ -35,11 +35,3 @@ const IGNORE_PACKAGES = ['@0xproject/deployer'];
utils.log(err);
process.exit(1);
});
-
-async function depcheckAsync(path: string, opts: any): Promise<depcheck.Results> {
- return new Promise<depcheck.Results>((resolve, reject) => {
- depcheck(path, opts, (unused: any) => {
- resolve(unused);
- });
- });
-}