Special-case ZRXToken snake case conversion

This commit is contained in:
Leonid Logvinov
2018-02-06 22:40:14 +01:00
committed by Amir Bandeali
parent fcbe24a126
commit b61852b1f5
3 changed files with 6 additions and 3 deletions

View File

@@ -64,7 +64,10 @@ function registerPartials(partialsGlob: string) {
} }
function writeOutputFile(name: string, renderedTsCode: string): void { 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`; const filePath = `${args.output}/${fileName}.ts`;
fs.writeFileSync(filePath, renderedTsCode); fs.writeFileSync(filePath, renderedTsCode);
utils.log(`Created: ${chalk.bold(filePath)}`); utils.log(`Created: ${chalk.bold(filePath)}`);

View File

@@ -5,4 +5,4 @@ multi_sig_wallet_with_time_lock.ts
multi_sig_wallet.ts multi_sig_wallet.ts
token_registry.ts token_registry.ts
token_transfer_proxy.ts token_transfer_proxy.ts
z_r_x_token.ts zrx_token.ts

View File

@@ -5,7 +5,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai'; import * as chai from 'chai';
import * as Web3 from 'web3'; 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 { constants } from '../util/constants';
import { ContractName } from '../util/types'; import { ContractName } from '../util/types';