1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

compile empty coffee files to js anyway.

This commit is contained in:
Jeremy Ashkenas 2010-08-04 23:42:46 -04:00
parent 17bf3b7115
commit b1f7d5e33b
2 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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) ->