Skip to content

Commit

Permalink
chore: Change console.log to shell.echo
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilson Lim committed Feb 13, 2021
1 parent d2a8149 commit f6d182e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
}
Expand Down

0 comments on commit f6d182e

Please sign in to comment.