From 9801f749804cc487892a3df268c50e685149cdb3 Mon Sep 17 00:00:00 2001 From: Juan Carlos Farah Date: Thu, 24 Oct 2019 15:40:10 +0200 Subject: [PATCH] feat: write empty changelog closes #30 --- src/initStarter.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/initStarter.js b/src/initStarter.js index 1e9eab8..90ca775 100644 --- a/src/initStarter.js +++ b/src/initStarter.js @@ -147,6 +147,15 @@ const writeReadme = async (rootPath, name, type) => { } }; +const writeChangeLog = async (rootPath) => { + const string = '# Change Log'; + try { + await fs.writeFile(path.join(rootPath, 'CHANGELOG.md'), string, 'utf8'); + } catch (e) { + console.error(e); + } +}; + const initStarter = async (options = {}) => { const { starter = DEFAULT_STARTER, @@ -200,6 +209,9 @@ const initStarter = async (options = {}) => { // write readme await writeReadme(projectDirectory, name, type); + // write empty changelog + await writeChangeLog(projectDirectory); + return commit(projectDirectory); };