From 08de488251b77d95bed2fb581142cfab94ccfd9d Mon Sep 17 00:00:00 2001 From: Denis Seleznev Date: Fri, 24 Apr 2015 23:02:30 +0300 Subject: [PATCH] Fix html ext --- bin/cli.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cli.js b/bin/cli.js index 8a46083..4b30cd7 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -9,6 +9,7 @@ var fs = require('fs'), return fs.statSync(path).isDirectory(); }, buildTemplates = function(filesIn, fileOut, withoutKernel) { + fileOut = fileOut || (filesIn.length === 1 ? filesIn[0].replace(/\.html?$/i, '') + '.js' : './all.jst.js'); var fd = fs.openSync(fileOut, 'w+'); fs.writeSync(fd, compiler.compileFiles(filesIn, {withoutKernel: withoutKernel}));