Permalink
Browse files

revise output file - do not create gz and skip digest in filename; ad…

…d vendor folder
  • Loading branch information...
1 parent febb80d commit fe089a6bd4e50742410120aa53aec650c4d21284 @siuying committed Mar 23, 2012
View
10 Guardfile
@@ -2,14 +2,14 @@ require 'rubygems'
require 'bundler/setup'
require './sprockets_helper'
-guard 'sprockets2' , :sprockets => SprocketsHelper.environment, :precompile => [/\w+\.(?!js|css|scss|coffee).+/, /application.(css|js)$/ ] do
+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)/.+$})
end
-guard 'rake', :task => 'copy_assets' do
- watch(%r{^public/assets/application-.+$})
-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]}") }
View
3 README.md
@@ -14,4 +14,7 @@ Start development by running the gaurd command:
Guard will watch the app folder and compile javascripts, coffeescripts, SASS and css.
+Put your application images, javascripts and stylesheets into app/images, app/javascripts and app/stylesheets.
+
+Put your vendor images, javascripts and stylesheets into vendor/images, vendor/javascripts and vendor/stylesheets.
View
2 app/javascripts/application.js.coffee
@@ -1,2 +1,2 @@
-//= require_self
//= require_tree .
+//= require_self
View
6 sprockets_helper.rb
@@ -6,17 +6,17 @@ module SprocketsHelper
def self.environment
environment = Sprockets::Environment.new(File.dirname(__FILE__))
- css_dir = ["app/stylesheets"]
+ css_dir = ["app/stylesheets", "vendor/stylesheets"]
css_dir.each do |path|
environment.append_path path
end
- js_dir = ["app/javascripts"]
+ js_dir = ["app/javascripts", "vendor/javascripts"]
js_dir.each do |path|
environment.append_path path
end
- images_dir = ["app/images"]
+ images_dir = ["app/images", "vendor/images"]
images_dir.each do |path|
environment.append_path path
end
View
0 vendor/images/.gitignore
No changes.
View
0 vendor/javascripts/.gitignore
No changes.
View
0 vendor/stylesheets/.gitignore
No changes.

0 comments on commit fe089a6

Please sign in to comment.