aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/cli.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler/src/cli.ts')
-rw-r--r--packages/sol-compiler/src/cli.ts52
1 files changed, 0 insertions, 52 deletions
diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts
deleted file mode 100644
index db0c09581..000000000
--- a/packages/sol-compiler/src/cli.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env node
-// We need the above pragma since this script will be run as a command-line tool.
-
-import { logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import 'source-map-support/register';
-import * as yargs from 'yargs';
-
-import { Compiler } from './compiler';
-
-const DEFAULT_CONTRACTS_LIST = '*';
-const SEPARATOR = ',';
-
-(async () => {
- const argv = yargs
- .option('contracts-dir', {
- type: 'string',
- description: 'path of contracts directory to compile',
- })
- .option('artifacts-dir', {
- type: 'string',
- description: 'path to write contracts artifacts to',
- })
- .option('contracts', {
- type: 'string',
- description: 'comma separated list of contracts to compile',
- })
- .option('watch', {
- alias: 'w',
- default: false,
- })
- .help().argv;
- const contracts = _.isUndefined(argv.contracts)
- ? undefined
- : argv.contracts === DEFAULT_CONTRACTS_LIST
- ? DEFAULT_CONTRACTS_LIST
- : argv.contracts.split(SEPARATOR);
- const opts = {
- contractsDir: argv.contractsDir,
- artifactsDir: argv.artifactsDir,
- contracts,
- };
- const compiler = new Compiler(opts);
- if (argv.watch) {
- await compiler.watchAsync();
- } else {
- await compiler.compileAsync();
- }
-})().catch(err => {
- logUtils.log(err);
- process.exit(1);
-});