Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removing the watch method and leaving that declaration inline.

  • Loading branch information...
commit 8b15fd985b7a9b222eaabd5f78e690b0fc9a6f1b 1 parent 6b78a5b
@heygrady authored
Showing with 24 additions and 26 deletions.
  1. +24 −26 lib/compass/sprockets.rb
View
50 lib/compass/sprockets.rb
@@ -24,34 +24,32 @@ module Sprockets
end
# register a custom watch
- def watch
- Compass.configuration.watch Compass.configuration.javascripts_src_dir + "/**/*" do |project_dir, relative_path|
- puts project_dir
- puts relative_path
- if File.exists?(File.join(project_dir, relative_path))
- # configure environment
- environment = Sprockets::Environment.new(project_dir)
- environment.append_path(Compass.configuration.javascripts_src_dir)
+ Compass.configuration.watch Compass.configuration.javascripts_src_dir + "/**/*" do |project_dir, relative_path|
+ puts project_dir
+ puts relative_path
+ if File.exists?(File.join(project_dir, relative_path))
+ # configure environment
+ environment = Sprockets::Environment.new(project_dir)
+ environment.append_path(Compass.configuration.javascripts_src_dir)
- # add compressor if defined
- if Compass.configuration.compress_javascript
- environment.js_compressor = Sprockets::LazyCompressor.new {
- Sprockets::Compressors.registered_js_compressor(Compass.configuration.javascript_compressor)
- }
- end
-
- # configure the static compiler
- compiler = Sprockets::StaticCompiler.new(
- environment,
- Compass.configuration.javascripts_dir,
- [/^([\w-]+\/)?[^_]\w+\.(js|coffee)$/],
- :manifest_path => Compass.configuration.javascripts_dir,
- :digest => false,
- :manifest => false,
- :zip_files => /a^/
- )
- compiler.compile
+ # add compressor if defined
+ if Compass.configuration.compress_javascript
+ environment.js_compressor = Sprockets::LazyCompressor.new {
+ Sprockets::Compressors.registered_js_compressor(Compass.configuration.javascript_compressor)
+ }
end
+
+ # configure the static compiler
+ compiler = Sprockets::StaticCompiler.new(
+ environment,
+ Compass.configuration.javascripts_dir,
+ [/^([\w-]+\/)?[^_]\w+\.(js|coffee)$/],
+ :manifest_path => Compass.configuration.javascripts_dir,
+ :digest => false,
+ :manifest => false,
+ :zip_files => /a^/
+ )
+ compiler.compile
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.