From 5723c99c6d2d750858100db8ee10595c3840a7a0 Mon Sep 17 00:00:00 2001 From: Heino Lenting Date: Tue, 11 Jul 2017 11:12:15 +0200 Subject: [PATCH] Update cli.js to support dots in filename Always add the .html extenstion even when there is dot (e.g. main.component.ejs) in the filename. --- lib/cli.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cli.js b/lib/cli.js index 2a9fe3b..0dc787c 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -56,9 +56,7 @@ var parseOptionsFile = require(__dirname + '/parseOptionsFile'); function writeCompiled (result, srcPath, callback) { if (outDir) { srcPath = srcPath.replace(/\.ejs$/, ''); - if (!/\./.test(srcPath)) { - srcPath += '.html'; - } + srcPath += '.html'; srcPath = srcPath.replace(baseDir, ''); var dest = path.join(outDir, srcPath);