mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
fixing Issue #569. Compiling empty source files to disk with --no-wrap on.
This commit is contained in:
parent
4d2dd337f6
commit
5f2326e911
2 changed files with 4 additions and 0 deletions
|
@ -150,6 +150,9 @@
|
|||
dir = options.output ? path.join(options.output, baseDir) : srcDir;
|
||||
jsPath = path.join(dir, filename);
|
||||
compile = function() {
|
||||
if (!(js.length)) {
|
||||
return null;
|
||||
}
|
||||
return fs.writeFile(jsPath, js, function(err) {
|
||||
if (options.compile && options.watch) {
|
||||
return puts("Compiled " + source);
|
||||
|
|
|
@ -129,6 +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
|
||||
fs.writeFile jsPath, js, (err) ->
|
||||
puts "Compiled #source" if options.compile and options.watch
|
||||
path.exists dir, (exists) ->
|
||||
|
|
Loading…
Reference in a new issue