Skip to content

Commit bc222fa

Browse files
Nils Schönwaldwatilde
authored andcommitted
Add log option
1 parent 9e12f63 commit bc222fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ var argv = require("yargs")
3636
})
3737
.alias('t', 'stringifier')
3838
.describe('t', 'Alternative output stringifier')
39+
.alias('l', 'log')
40+
.describe('l', 'Log when file is written')
3941
.alias('w', 'watch')
4042
.describe('w', 'auto-recompile when detecting source changes')
4143
.requiresArg(['u', 'c', 'i', 'o', 'd', 's', 'p', 't'])
@@ -269,6 +271,10 @@ function writeFile(name, content, fn) {
269271
fn(err);
270272
} else {
271273
fs.writeFile(name, content, fn);
274+
275+
if (argv.log) {
276+
console.log('Generated file: ' + name);
277+
}
272278
}
273279
});
274280
}

0 commit comments

Comments
 (0)