Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Output dir option for coffee-script

  • Loading branch information...
commit 3ffcb5bcef626b80bdcf491bd54629afce4d5b15 1 parent 5e15c5c
@quirkey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/soca/plugins/coffeescript.rb
View
4 lib/soca/plugins/coffeescript.rb
@@ -30,11 +30,11 @@ def before_build
parts = basename.split(/\./)
new_file = (parts.length > 2 ? parts[0..-2].join('.') : parts[0]) + ".js"
- File.open(File.join(dir, new_file), 'w') do |f|
+ output_dir = options[:output_dir] || dir
+ File.open(File.join(output_dir, new_file), 'w') do |f|
f << ::CoffeeScript.compile(File.read(file), vars)
end
Soca.logger.debug "Wrote to #{new_file}"
-
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.