From 5a6fd5140304bbef5992ce7e3ab9e88d2ae42278 Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Sun, 23 Feb 2020 15:29:51 +0200 Subject: [PATCH] Update variable name for make:template command. --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 0094c39..a872de8 100644 --- a/src/index.js +++ b/src/index.js @@ -45,14 +45,14 @@ module.exports = () => { } try { - const layout = fs.readFileSync(`${__dirname}/stubs/template.njk`, 'utf-8') + const template = fs.readFileSync(`${__dirname}/stubs/template.njk`, 'utf-8') const destination = cmdObj.dir ? path.resolve(`${cmdObj.dir}/${filename}`) : path.resolve(`${process.cwd()}/src/templates/${filename}`) if (fs.existsSync(destination)) { throw(`Error: ${destination} already exists.`) } - fs.outputFileSync(destination, layout) + fs.outputFileSync(destination, template) console.log(`✔ Successfully created new Template in ${destination}`) } catch (error) { throw error