Skip to content

Instantly share code, notes, and snippets.

@markupboy
Created March 15, 2013 17:24
Show Gist options
  • Save markupboy/5171552 to your computer and use it in GitHub Desktop.
Save markupboy/5171552 to your computer and use it in GitHub Desktop.
============================
Building JS API files
============================
Creating JS API for usd
Creating JS API for jpy
rake aborted!
"\xC2" on US-ASCII
(in /Users/markupboy/Dropbox/Sites/bigcartel/javascript-api/javascripts/format.js.coffee.erb)
/Users/markupboy/Dropbox/Sites/bigcartel/javascript-api/builder.rb:10:in `build'
/Users/markupboy/Dropbox/Sites/bigcartel/javascript-api/Rakefile:19:in `block (2 levels) in <top (required)>'
/Users/markupboy/Dropbox/Sites/bigcartel/javascript-api/Rakefile:17:in `each'
/Users/markupboy/Dropbox/Sites/bigcartel/javascript-api/Rakefile:17:in `block in <top (required)>'
Tasks: TOP => build
(See full trace by running task with --trace)
task :build do
require 'rubygems'
require 'bundler'
Bundler.require
require './builder'
require 'FileUtils' unless defined?(FileUtils)
puts "============================"
puts "Building JS API files"
puts "============================"
currencies = ['usd', 'jpy']
currencies.each { |currency|
puts "Creating JS API for #{currency}"
content = Builder.build currency
content = Uglifier.new.compile(content)
# file = "./build/api.#{currency}.js"
# FileUtils.mkdir_p File.dirname(file)
# File.open(file, 'wb+') { |f| f.write(content) }
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment