Skip to content

Commit

Permalink
🔇 Remove verbose logging
Browse files Browse the repository at this point in the history
  • Loading branch information
leolabs committed Nov 15, 2019
1 parent 94246c1 commit f45b659
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,12 @@ const translate = async (
languageFile ? languageFile.name : '',
);
let cacheDiff: string[] = [];
if (fs.existsSync(cachePath)) {
if (fs.existsSync(cachePath) && !fs.statSync(cachePath).isDirectory()) {
const cachedFile = flatten.convert(
JSON.parse(fs.readFileSync(cachePath).toString()),
);
const cDiff = diff(cachedFile, templateFile.content);
cacheDiff = Object.keys(cDiff).filter(k => cDiff[k]);
console.log();
console.log('Cached File:', cachedFile);
console.log('Current File:', templateFile.content);
console.log('Cache Diff:', cacheDiff);
const changedItems = Object.keys(cacheDiff).length.toString();
process.stdout.write(
chalk` ({green.bold ${changedItems}} changes from cache)`,
Expand Down

0 comments on commit f45b659

Please sign in to comment.