aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/cli.ts
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-20 06:59:07 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-20 06:59:07 +0800
commit5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf (patch)
treeaed059ac8540233b7fbd20aa32bc3a0f21734182 /packages/sol-compiler/src/cli.ts
parentaa5c2c249d43c980c06d3a5541233f2407a83371 (diff)
parent125a940560a01305781bfb6754f52fa64669a6f3 (diff)
downloaddexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.tar
dexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.tar.gz
dexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.tar.bz2
dexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.tar.lz
dexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.tar.xz
dexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.tar.zst
dexon-0x-contracts-5eb316f5d832d0e7ffc8a3a3858350cc13af3dcf.zip
Merge remote-tracking branch 'upstream/feature/website/0x-org' into feature/website/0x-org
# Conflicts: # packages/website/ts/@next/components/button.tsx # packages/website/ts/@next/components/definition.tsx # packages/website/ts/@next/components/hero.tsx # packages/website/ts/@next/components/sections/landing/about.tsx # packages/website/ts/@next/pages/market_maker.tsx
Diffstat (limited to 'packages/sol-compiler/src/cli.ts')
-rw-r--r--packages/sol-compiler/src/cli.ts10
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);