Skip to content

Commit

Permalink
refactor: allow access to vyper-json via vyper-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Aug 21, 2020
1 parent 0879886 commit 6b8b7f6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion vyper/cli/vyper_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Dict, Iterable, Iterator, Sequence, Set, TypeVar

import vyper
from vyper.cli import vyper_json
from vyper.cli.utils import extract_file_interface_imports
from vyper.opcodes import DEFAULT_EVM_VERSION, EVM_VERSIONS
from vyper.parser import parser_utils
Expand Down Expand Up @@ -50,9 +51,13 @@ def _parse_cli_args():


def _parse_args(argv):

warnings.simplefilter("always")

if "--standard-json" in argv:
argv.remove("--standard-json")
vyper_json._parse_args(argv)
return

parser = argparse.ArgumentParser(
description="Pythonic Smart Contract Language for the EVM",
formatter_class=argparse.RawTextHelpFormatter,
Expand Down Expand Up @@ -81,6 +86,11 @@ def _parse_args(argv):
help="Set the traceback limit for error messages reported by the compiler",
type=int,
)
parser.add_argument(
"--standard-json",
help="Switch to standard JSON mode. Use `--standard-json -h` for available options.",
action="store_true",
)
parser.add_argument(
"-p", help="Set the root path for contract imports", default=".", dest="root_folder"
)
Expand Down Expand Up @@ -229,3 +239,7 @@ def compile_files(
compiler_data["version"] = vyper.__version__

return compiler_data


if __name__ == "__main__":
_parse_args(sys.argv[1:])

0 comments on commit 6b8b7f6

Please sign in to comment.