diff --git a/lib/command.js b/lib/command.js index 704edd9f..f7809023 100644 --- a/lib/command.js +++ b/lib/command.js @@ -150,8 +150,8 @@ dir = options.output ? path.join(options.output, baseDir) : srcDir; jsPath = path.join(dir, filename); compile = function() { - if (!(js.length)) { - return null; + if (js.length <= 0) { + js = ' '; } return fs.writeFile(jsPath, js, function(err) { if (options.compile && options.watch) { diff --git a/src/command.coffee b/src/command.coffee index b7815559..ade16b29 100644 --- a/src/command.coffee +++ b/src/command.coffee @@ -129,7 +129,7 @@ writeJs = (source, js, base) -> dir = if options.output then path.join options.output, baseDir else srcDir jsPath = path.join dir, filename compile = -> - return unless js.length + js = ' ' if js.length <= 0 fs.writeFile jsPath, js, (err) -> puts "Compiled #source" if options.compile and options.watch path.exists dir, (exists) ->