From eb4adcf797cab80b9fa7c08083978be5514df8b9 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 5 Dec 2017 17:46:51 +0300 Subject: Introduce a const for 'contract.mustache' --- packages/typed-contracts/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/typed-contracts/src/index.ts b/packages/typed-contracts/src/index.ts index bbb527574..0a74e1594 100644 --- a/packages/typed-contracts/src/index.ts +++ b/packages/typed-contracts/src/index.ts @@ -15,6 +15,7 @@ import {ParamKind} from './types'; import {utils} from './utils'; const ABI_TYPE_METHOD = 'function'; +const MAIN_TEMPLATE_NAME = 'contract.mustache'; const args = yargs .option('abiGlob', { @@ -49,7 +50,7 @@ for (const partialTemplateFileName of partialTemplateFileNames) { Handlebars.registerPartial(namedContent.name, namedContent.content); } -const mainTemplate = utils.getNamedContent(`${args.templates}/contract.mustache`); +const mainTemplate = utils.getNamedContent(`${args.templates}/${MAIN_TEMPLATE_NAME}`); const template = Handlebars.compile(mainTemplate.content); const abiFileNames = globSync(args.abiGlob); if (_.isEmpty(abiFileNames)) { -- cgit