Skip to content

Commit

Permalink
Fix crash when style is not specified - Fixes #136
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Dec 7, 2015
1 parent 8c216e0 commit ee35747
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/cleaver
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ program
var file = program.args[0];
var options = getOptions();
createAndSave([file], options);

console.log('Watching for changes on ' + file + '. Ctrl-C to abort.');
fs.watchFile(file, { persistent: true, interval: 100 }, function () {
console.log('Rebuilding: ' + new Date());
createAndSave([file], options);
});
// also watch on stylesheet if included via command prompt
if ('style' in options) {

// Also watch on stylesheet if included via command prompt
if (options.style) {
console.log('Also watching for changes on ' + options.style);
fs.watchFile(options.style, { persistent: true, interval: 100 }, function () {
console.log('Rebuilding: ' + new Date());
Expand Down

0 comments on commit ee35747

Please sign in to comment.