Permalink
Browse files

add coffeescripts compile and jasmine test on compiled coffee

  • Loading branch information...
1 parent f04381f commit 2d75c8b6110addd9d2a42d0f60d03e2b1a49cd9d @siuying committed Mar 23, 2012
View
@@ -11,6 +11,7 @@ gem 'sprockets'
gem 'jasmine-headless-webkit', :git => 'git://github.com/johnbintz/jasmine-headless-webkit.git', :branch => 'master'
gem 'guard-rake'
+gem 'guard-coffeescript'
gem 'guard-sprockets2'
gem 'guard-jasmine-headless-webkit'
View
@@ -27,6 +27,9 @@ GEM
guard (1.0.1)
ffi (>= 0.5.0)
thor (~> 0.14.6)
+ guard-coffeescript (0.5.6)
+ coffee-script (>= 2.2.0)
+ guard (>= 0.8.3)
guard-jasmine-headless-webkit (0.3.2)
guard (>= 0.4.0)
jasmine-headless-webkit (>= 0.7.0)
@@ -83,6 +86,7 @@ PLATFORMS
DEPENDENCIES
coffee-script
+ guard-coffeescript
guard-jasmine-headless-webkit
guard-rake
guard-sprockets2
View
@@ -2,16 +2,25 @@ require 'rubygems'
require 'bundler/setup'
require './sprockets_helper'
+guard 'coffeescript', :output => 'app/javascripts/compiled' do
+ watch(%r{^app/coffeescripts/.*\.coffee$})
+end
+
+guard 'coffeescript', :output => 'spec/javascripts/compiled' do
+ watch(%r{^spec/coffeescripts/.*\.coffee$})
+end
+
guard 'sprockets2',
:sprockets => SprocketsHelper.environment,
:precompile => [/\w+\.(?!js|css|scss|coffee).+/, /application.(css|js)$/ ],
:digest => false,
:gz => false do
watch(%r{^app/(images|javascripts|stylesheets)/.+$})
+ watch("config/assets.yml")
end
guard 'jasmine-headless-webkit' do
watch(%r{^spec/(.+)_spec\.(js\.coffee|js|coffee)}) { |m| newest_js_file("spec/#{m[1]}_spec.#{m[2]}") }
watch(%r{^lib/(.+)\.(js\.coffee|js)|coffee}) { |m| newest_js_file("spec/lib/#{m[1]}_spec.#{m[2]}") }
watch(%r{spec/spec_helper\.(js\.coffee|js|coffee)}) { "spec" }
-end
+end
No changes.
No changes.
No changes.
No changes.
@@ -1,74 +1,7 @@
-# src_files
-#
-# Return an array of filepaths relative to src_dir to include before jasmine specs.
-# Default: []
-#
-# EXAMPLE:
-#
-# src_files:
-# - lib/source1.js
-# - lib/source2.js
-# - dist/**/*.js
-#
+src_dir: app/javascripts
src_files:
- - public/assets/application.js
+ - "**/*.js"
-# stylesheets
-#
-# Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
-# Default: []
-#
-# EXAMPLE:
-#
-# stylesheets:
-# - css/style.css
-# - stylesheets/*.css
-#
-stylesheets:
- - public/assets/application.css
-
-# helpers
-#
-# Return an array of filepaths relative to spec_dir to include before jasmine specs.
-# Default: ["helpers/**/*.js"]
-#
-# EXAMPLE:
-#
-# helpers:
-# - helpers/**/*.js
-#
-helpers:
-
-# spec_files
-#
-# Return an array of filepaths relative to spec_dir to include.
-# Default: ["**/*[sS]pec.js"]
-#
-# EXAMPLE:
-#
-# spec_files:
-# - **/*[sS]pec.js
-#
+spec_dir: spec/javascripts
spec_files:
-
-# src_dir
-#
-# Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
-# Default: project root
-#
-# EXAMPLE:
-#
-# src_dir: public
-#
-src_dir:
-
-# spec_dir
-#
-# Spec directory path. Your spec_files must be returned relative to this path.
-# Default: spec/javascripts
-#
-# EXAMPLE:
-#
-# spec_dir: spec/javascripts
-#
-spec_dir:
+ - "**/*[sS]pec.js"

0 comments on commit 2d75c8b

Please sign in to comment.