Get contracts list from Compiler class to add support for reading all contracts by default
This commit is contained in:
parent
88d055c3db
commit
fb7b51d91b
@ -28,6 +28,7 @@
|
|||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts-gen/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts-gen/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/sol-resolver": "^2.0.8",
|
"@0x/sol-resolver": "^2.0.8",
|
||||||
|
"@0x/sol-compiler": "^3.1.9",
|
||||||
"@0x/types": "^2.4.0",
|
"@0x/types": "^2.4.0",
|
||||||
"@0x/typescript-typings": "^4.2.3",
|
"@0x/typescript-typings": "^4.2.3",
|
||||||
"@0x/utils": "^4.4.0",
|
"@0x/utils": "^4.4.0",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
import { Compiler } from '@0x/sol-compiler';
|
||||||
import { NameResolver } from '@0x/sol-resolver';
|
import { NameResolver } from '@0x/sol-resolver';
|
||||||
import { PackageJSON } from '@0x/types';
|
import { PackageJSON } from '@0x/types';
|
||||||
import { logUtils } from '@0x/utils';
|
import { logUtils } from '@0x/utils';
|
||||||
@ -24,7 +25,8 @@ const AUTO_GENERATED_BANNER_FOR_LISTS = `This list is auto-generated by contract
|
|||||||
(async () => {
|
(async () => {
|
||||||
const packageDir = process.cwd();
|
const packageDir = process.cwd();
|
||||||
const compilerJSON = readJSONFile<CompilerOptions>('compiler.json');
|
const compilerJSON = readJSONFile<CompilerOptions>('compiler.json');
|
||||||
const contracts = compilerJSON.contracts;
|
const compiler = new Compiler(compilerJSON);
|
||||||
|
const contracts = compiler.getContractNamesToCompile();
|
||||||
const contractsDir = compilerJSON.contractsDir || DEFAULT_CONTRACTS_DIR;
|
const contractsDir = compilerJSON.contractsDir || DEFAULT_CONTRACTS_DIR;
|
||||||
const artifactsDir = compilerJSON.artifactsDir || DEFAULT_ARTIFACTS_DIR;
|
const artifactsDir = compilerJSON.artifactsDir || DEFAULT_ARTIFACTS_DIR;
|
||||||
const wrappersDir = DEFAULT_WRAPPERS_DIR;
|
const wrappersDir = DEFAULT_WRAPPERS_DIR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user