From b61852b1f5501efd357e61c5478f25b68455dc38 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 6 Feb 2018 22:40:14 +0100 Subject: Special-case ZRXToken snake case conversion --- packages/abi-gen/src/index.ts | 5 ++++- packages/contracts/src/contract_wrappers/generated/.gitignore | 2 +- packages/contracts/test/zrx_token.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index 46d41861d..68beb2352 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -64,7 +64,10 @@ function registerPartials(partialsGlob: string) { } function writeOutputFile(name: string, renderedTsCode: string): void { - const fileName = toSnakeCase(name); + let fileName = toSnakeCase(name); + if (fileName === 'z_r_x_token') { + fileName = 'zrx_token'; + } const filePath = `${args.output}/${fileName}.ts`; fs.writeFileSync(filePath, renderedTsCode); utils.log(`Created: ${chalk.bold(filePath)}`); diff --git a/packages/contracts/src/contract_wrappers/generated/.gitignore b/packages/contracts/src/contract_wrappers/generated/.gitignore index c9bba195a..b976a8737 100644 --- a/packages/contracts/src/contract_wrappers/generated/.gitignore +++ b/packages/contracts/src/contract_wrappers/generated/.gitignore @@ -5,4 +5,4 @@ multi_sig_wallet_with_time_lock.ts multi_sig_wallet.ts token_registry.ts token_transfer_proxy.ts -z_r_x_token.ts +zrx_token.ts diff --git a/packages/contracts/test/zrx_token.ts b/packages/contracts/test/zrx_token.ts index 5e4bfed37..1610ada12 100644 --- a/packages/contracts/test/zrx_token.ts +++ b/packages/contracts/test/zrx_token.ts @@ -5,7 +5,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import * as Web3 from 'web3'; -import { ZRXTokenContract } from '../src/contract_wrappers/generated/z_r_x_token'; +import { ZRXTokenContract } from '../src/contract_wrappers/generated/zrx_token'; import { constants } from '../util/constants'; import { ContractName } from '../util/types'; -- cgit