Skip to content

Commit

Permalink
All tests pass. fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
machty committed Jan 24, 2013
1 parent c6b3762 commit af36470
Show file tree
Hide file tree
Showing 19 changed files with 4,645 additions and 1,840 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ gem "therubyracer", ">= 0.9.8", "< 0.11"
gem "rspec"
gem "uglifier"
gem "listen"
gem "coffee-script"
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
GEM
remote: http://rubygems.org/
specs:
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
diff-lcs (1.1.3)
execjs (1.4.0)
multi_json (~> 1.0)
Expand All @@ -26,6 +30,7 @@ PLATFORMS
ruby

DEPENDENCIES
coffee-script
listen
rake
rspec
Expand Down
18 changes: 10 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ require "rubygems"
require "bundler/setup"
require 'find'
require 'uglifier'
require 'coffee-script'

SRC_PATH = './src'
BUILD_PATH = './lib'

COFFEES = %w{ emblem compiler preprocessor translation emberties }
COFFEES = %w{ emblem compiler preprocessor emberties }

#minimal_deps = %w(base compiler/parser compiler/base compiler/ast utils compiler/compiler runtime).map do |file|

desc 'Compiles and concatenates source coffeescript files'
task :coffee do
files = join_filenames(
COFFEES.map { |file| "#{file}.coffee" },
SRC_PATH
)

# Compile everything
`coffee -b --output #{BUILD_PATH} --compile #{files}`
COFFEES.each do |src|
File.open("#{BUILD_PATH}/#{src}.js", 'w') do |f|
js = CoffeeScript.compile(File.read("#{SRC_PATH}/#{src}.coffee"), bare: true)
f.puts js
end
end

if $?.to_i == 0
puts "Compiled successfully."
else
Expand Down Expand Up @@ -88,7 +90,7 @@ def remove_exports(string)
string = string.gsub(/^(module\.)/, "// \1")
end

minimal_deps = %w(emblem parser compiler preprocessor translation emberties).map do |file|
minimal_deps = %w(emblem parser compiler preprocessor emberties).map do |file|
"lib/#{file}.js"
end

Expand Down
Loading

0 comments on commit af36470

Please sign in to comment.