diff --git a/src/cli.ts b/src/cli.ts index 91e08751..cf9926d3 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -98,7 +98,7 @@ commander const srcPath = resolve(relativeSrcPath); // get project reflection - const templates = JSON.parse(srcPath) as ElasticsearchTemplateCollection; + const templates = require(srcPath) as ElasticsearchTemplateCollection; for (const template in templates) { if (!templates.hasOwnProperty(template)) {