aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler')
-rw-r--r--packages/sol-compiler/package.json3
-rw-r--r--packages/sol-compiler/src/utils/compiler.ts2
-rw-r--r--packages/sol-compiler/src/utils/fs_wrapper.ts3
-rw-r--r--packages/sol-compiler/test/compiler_test.ts3
4 files changed, 7 insertions, 4 deletions
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json
index 745760cd0..19d390c32 100644
--- a/packages/sol-compiler/package.json
+++ b/packages/sol-compiler/package.json
@@ -11,7 +11,6 @@
"run_mocha": "mocha lib/test/*_test.js --bail --exit",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
- "compile": "npm run build; node lib/src/cli.js compile",
"clean": "shx rm -rf lib scripts",
"migrate": "npm run build; node lib/src/cli.js migrate",
"lint": "tslint --project .",
@@ -50,6 +49,7 @@
"@0xproject/dev-utils": "^0.4.1",
"@0xproject/monorepo-scripts": "^0.1.19",
"@0xproject/tslint-config": "^0.4.17",
+ "@types/mkdirp": "^0.5.2",
"@types/require-from-string": "^1.2.0",
"@types/semver": "^5.5.0",
"chai": "^4.0.1",
@@ -79,6 +79,7 @@
"ethereumjs-util": "^5.1.1",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",
+ "mkdirp": "^0.5.1",
"require-from-string": "^2.0.1",
"semver": "^5.5.0",
"solc": "^0.4.23",
diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts
index c571b2581..3731385e2 100644
--- a/packages/sol-compiler/src/utils/compiler.ts
+++ b/packages/sol-compiler/src/utils/compiler.ts
@@ -40,7 +40,7 @@ export async function getContractArtifactIfExistsAsync(
export async function createDirIfDoesNotExistAsync(dirPath: string): Promise<void> {
if (!fsWrapper.doesPathExistSync(dirPath)) {
logUtils.log(`Creating directory at ${dirPath}...`);
- await fsWrapper.mkdirAsync(dirPath);
+ await fsWrapper.mkdirpAsync(dirPath);
}
}
diff --git a/packages/sol-compiler/src/utils/fs_wrapper.ts b/packages/sol-compiler/src/utils/fs_wrapper.ts
index e02c83f27..cc7b06175 100644
--- a/packages/sol-compiler/src/utils/fs_wrapper.ts
+++ b/packages/sol-compiler/src/utils/fs_wrapper.ts
@@ -1,11 +1,12 @@
import { promisify } from '@0xproject/utils';
import * as fs from 'fs';
+import * as mkdirp from 'mkdirp';
export const fsWrapper = {
readdirAsync: promisify<string[]>(fs.readdir),
readFileAsync: promisify<string>(fs.readFile),
writeFileAsync: promisify<undefined>(fs.writeFile),
- mkdirAsync: promisify<undefined>(fs.mkdir),
+ mkdirpAsync: promisify<undefined>(mkdirp),
doesPathExistSync: fs.existsSync,
rmdirSync: fs.rmdirSync,
removeFileAsync: promisify<undefined>(fs.unlink),
diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts
index 7ccaeef07..79bb3b873 100644
--- a/packages/sol-compiler/test/compiler_test.ts
+++ b/packages/sol-compiler/test/compiler_test.ts
@@ -1,9 +1,10 @@
+import { DoneCallback } from '@0xproject/types';
import * as chai from 'chai';
import 'mocha';
import { Compiler } from '../src/compiler';
import { fsWrapper } from '../src/utils/fs_wrapper';
-import { CompilerOptions, ContractArtifact, ContractNetworkData, DoneCallback } from '../src/utils/types';
+import { CompilerOptions, ContractArtifact, ContractNetworkData } from '../src/utils/types';
import { exchange_binary } from './fixtures/exchange_bin';
import { constants } from './util/constants';