diff --git a/CHANGELOG.md b/CHANGELOG.md index 86b852c..c42180e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ For each keypoint, treat like commit messages, follow [Chris Beams' rules](https ## [Unreleased] +## [0.1.10] - 2021-02-13 +### Changed: +- chore: Change console.log to shell.echo ## [0.1.9] - 2021-02-13 ### Changed: - chore: Add debug log (package-lock.json not showing) diff --git a/index.js b/index.js index 132786e..7161a5d 100755 --- a/index.js +++ b/index.js @@ -156,8 +156,8 @@ async function run() { files.forEach((file) => { const path = `${appDirectory}/placeholder/${file}`; const hasFile = fs.pathExistsSync(path); - console.log(`${path}`); - console.log(`contain file: ${hasFile}`); + shell.echo(`${path}`); + shell.echo(`contain file: ${hasFile}`); if (hasFile){ // const data = fs.readFileSync(`./placeholder/${optionValue}/${file}`, 'utf8'); const data = fs.readFileSync(`${path}`, 'utf8'); @@ -167,13 +167,13 @@ async function run() { .replace(/__DATE__/g, dateString); fs.writeFileSync(`${appDirectory}/${file}`, result, 'utf8'); - console.log(`create file complete: ${path}`) + shell.echo(`create file complete: ${path}`) } }); shell.cd(folderValue); - console.log('Removing placeholder files'); shell.rm('-rf', 'placeholder'); + shell.echo(`${folderValue} created`); shell.exit(0); }