diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-21 02:22:29 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-21 02:22:29 +0800 |
commit | 75ba724c2867092672b914e18b6f702459ffcb36 (patch) | |
tree | 6d660213bbeac9a1d909eab0d98e67365225bc80 /packages/sol-compiler/src/cli.ts | |
parent | 2716374b2540953b946956c6b4203af637d9e873 (diff) | |
parent | bc3093e635e7753e897c9d7aa0f9d8dde49d752a (diff) | |
download | dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.tar dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.tar.gz dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.tar.bz2 dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.tar.lz dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.tar.xz dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.tar.zst dexon-sol-tools-75ba724c2867092672b914e18b6f702459ffcb36.zip |
Merge branch 'development' into feature/website/new-logos
Diffstat (limited to 'packages/sol-compiler/src/cli.ts')
-rw-r--r-- | packages/sol-compiler/src/cli.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts index 0a9db6e05..18cc68aaf 100644 --- a/packages/sol-compiler/src/cli.ts +++ b/packages/sol-compiler/src/cli.ts @@ -25,6 +25,10 @@ const SEPARATOR = ','; type: 'string', description: 'comma separated list of contracts to compile', }) + .option('watch', { + alias: 'w', + default: false, + }) .help().argv; const contracts = _.isUndefined(argv.contracts) ? undefined @@ -37,7 +41,11 @@ const SEPARATOR = ','; contracts, }; const compiler = new Compiler(opts); - await compiler.compileAsync(); + if (argv.watch) { + await compiler.watchAsync(); + } else { + await compiler.compileAsync(); + } })().catch(err => { logUtils.log(err); process.exit(1); |