watch app/assets as well
This commit is contained in:
commit
08593fddff
|
@ -2,4 +2,6 @@ rvm:
|
||||||
- 1.8.7
|
- 1.8.7
|
||||||
- 1.9.2
|
- 1.9.2
|
||||||
- 1.9.3
|
- 1.9.3
|
||||||
|
- rbx-2.0
|
||||||
|
- jruby
|
||||||
script: "bundle exec rake test"
|
script: "bundle exec rake test"
|
|
@ -2,6 +2,10 @@
|
||||||
====
|
====
|
||||||
Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
|
Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
|
||||||
|
|
||||||
|
2.0.13.2
|
||||||
|
====
|
||||||
|
Update Windows eventmachine dep
|
||||||
|
|
||||||
2.0.13.1
|
2.0.13.1
|
||||||
====
|
====
|
||||||
build --clean shouldn't remove dotfiles
|
build --clean shouldn't remove dotfiles
|
||||||
|
|
|
@ -7,9 +7,14 @@ Feature: Sprockets
|
||||||
|
|
||||||
Scenario: Sprockets JS require with custom :js_dir
|
Scenario: Sprockets JS require with custom :js_dir
|
||||||
Given the Server is running at "sprockets-app"
|
Given the Server is running at "sprockets-app"
|
||||||
When I go to "/library/javascripts/sprockets_base.js"
|
When I go to "/library/js/sprockets_base.js"
|
||||||
Then I should see "sprockets_sub_function"
|
Then I should see "sprockets_sub_function"
|
||||||
|
|
||||||
|
Scenario: Plain JS require with custom :js_dir
|
||||||
|
Given the Server is running at "sprockets-app"
|
||||||
|
When I go to "/library/css/plain.css"
|
||||||
|
Then I should see "helloWorld"
|
||||||
|
|
||||||
Scenario: Sprockets JS should have access to yaml data
|
Scenario: Sprockets JS should have access to yaml data
|
||||||
Given the Server is running at "test-app"
|
Given the Server is running at "test-app"
|
||||||
When I go to "/javascripts/multiple_engines.js"
|
When I go to "/javascripts/multiple_engines.js"
|
||||||
|
@ -32,10 +37,15 @@ Feature: Sprockets
|
||||||
|
|
||||||
Scenario: Sprockets CSS require with custom :css_dir //require
|
Scenario: Sprockets CSS require with custom :css_dir //require
|
||||||
Given the Server is running at "sprockets-app"
|
Given the Server is running at "sprockets-app"
|
||||||
When I go to "/library/stylesheets/sprockets_base1.css"
|
When I go to "/library/css/sprockets_base1.css"
|
||||||
Then I should see "hello"
|
Then I should see "hello"
|
||||||
|
|
||||||
|
Scenario: Plain CSS require with custom :css_dir
|
||||||
|
Given the Server is running at "sprockets-app"
|
||||||
|
When I go to "/library/css/plain.css"
|
||||||
|
Then I should see "helloWorld"
|
||||||
|
|
||||||
Scenario: Sprockets CSS require with custom :css_dir @import
|
Scenario: Sprockets CSS require with custom :css_dir @import
|
||||||
Given the Server is running at "sprockets-app"
|
Given the Server is running at "sprockets-app"
|
||||||
When I go to "/library/stylesheets/sprockets_base2.css"
|
When I go to "/library/css/sprockets_base2.css"
|
||||||
Then I should see "hello"
|
Then I should see "hello"
|
|
@ -1,10 +1,10 @@
|
||||||
Feature: Sprockets Gems
|
Feature: Sprockets Gems
|
||||||
Scenario: Sprockets can pull jQuery from gem
|
Scenario: Sprockets can pull jQuery from gem
|
||||||
Given the Server is running at "sprockets-app"
|
Given the Server is running at "sprockets-app"
|
||||||
When I go to "/library/javascripts/jquery_include.js"
|
When I go to "/library/js/jquery_include.js"
|
||||||
Then I should see "var jQuery ="
|
Then I should see "var jQuery ="
|
||||||
|
|
||||||
Scenario: Sprockets can pull CSS from gem
|
# Scenario: Sprockets can pull CSS from gem
|
||||||
Given the Server is running at "sprockets-app"
|
# Given the Server is running at "sprockets-app"
|
||||||
When I go to "/library/stylesheets/bootstrap_include.css"
|
# When I go to "/library/css/bootstrap_include.css"
|
||||||
Then I should see "Bootstrap"
|
# Then I should see "Bootstrap"
|
|
@ -1,2 +1,2 @@
|
||||||
set :js_dir, "library/javascripts"
|
set :js_dir, "library/js"
|
||||||
set :css_dir, "library/stylesheets"
|
set :css_dir, "library/css"
|
3
fixtures/sprockets-app/source/library/css/plain.css
Normal file
3
fixtures/sprockets-app/source/library/css/plain.css
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#helloWorld {
|
||||||
|
color: red;
|
||||||
|
}
|
3
fixtures/sprockets-app/source/library/js/plain.js
Normal file
3
fixtures/sprockets-app/source/library/js/plain.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function hellowWorld() {
|
||||||
|
|
||||||
|
}
|
|
@ -48,7 +48,7 @@
|
||||||
#
|
#
|
||||||
# [Visit the website]: http://middlemanapp.com
|
# [Visit the website]: http://middlemanapp.com
|
||||||
# [Read the wiki]: https://github.com/tdreyno/middleman/wiki
|
# [Read the wiki]: https://github.com/tdreyno/middleman/wiki
|
||||||
# [Email the users group]: http://groups.google.com/group/middleman-users
|
# [Email the users group]: https://convore.com/middleman/
|
||||||
# [Submit bug reports]: https://github.com/tdreyno/middleman/issues
|
# [Submit bug reports]: https://github.com/tdreyno/middleman/issues
|
||||||
|
|
||||||
# Setup our load paths
|
# Setup our load paths
|
||||||
|
@ -73,6 +73,7 @@ module Middleman
|
||||||
autoload :Sass, "middleman/renderers/sass"
|
autoload :Sass, "middleman/renderers/sass"
|
||||||
autoload :Slim, "middleman/renderers/slim"
|
autoload :Slim, "middleman/renderers/slim"
|
||||||
autoload :Markdown, "middleman/renderers/markdown"
|
autoload :Markdown, "middleman/renderers/markdown"
|
||||||
|
autoload :ERb, "middleman/renderers/erb"
|
||||||
autoload :CoffeeScript, "middleman/renderers/coffee_script"
|
autoload :CoffeeScript, "middleman/renderers/coffee_script"
|
||||||
autoload :Liquid, "middleman/renderers/liquid"
|
autoload :Liquid, "middleman/renderers/liquid"
|
||||||
end
|
end
|
||||||
|
|
|
@ -101,6 +101,9 @@ module Middleman::CoreExtensions::FrontMatter
|
||||||
class ERBTemplate < ::Tilt::ERBTemplate
|
class ERBTemplate < ::Tilt::ERBTemplate
|
||||||
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
||||||
end
|
end
|
||||||
|
class ErubisTemplate < ::Tilt::ErubisTemplate
|
||||||
|
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
||||||
|
end
|
||||||
|
|
||||||
class LiquidTemplate < ::Tilt::LiquidTemplate
|
class LiquidTemplate < ::Tilt::LiquidTemplate
|
||||||
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
include Middleman::CoreExtensions::FrontMatter::YamlAware
|
||||||
|
|
|
@ -11,6 +11,7 @@ module Middleman::CoreExtensions::Rendering
|
||||||
app.register Middleman::Renderers::Haml
|
app.register Middleman::Renderers::Haml
|
||||||
app.register Middleman::Renderers::Sass
|
app.register Middleman::Renderers::Sass
|
||||||
app.register Middleman::Renderers::Markdown
|
app.register Middleman::Renderers::Markdown
|
||||||
|
app.register Middleman::Renderers::ERb
|
||||||
app.register Middleman::Renderers::CoffeeScript
|
app.register Middleman::Renderers::CoffeeScript
|
||||||
app.register Middleman::Renderers::Liquid
|
app.register Middleman::Renderers::Liquid
|
||||||
end
|
end
|
||||||
|
|
34
lib/middleman/renderers/erb.rb
Normal file
34
lib/middleman/renderers/erb.rb
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
require "tilt"
|
||||||
|
|
||||||
|
module Middleman::Renderers::ERb
|
||||||
|
class << self
|
||||||
|
def registered(app)
|
||||||
|
app.extend ClassMethods
|
||||||
|
|
||||||
|
app.set :erb_engine, :erb
|
||||||
|
|
||||||
|
if !app.respond_to? :erb_engine_prefix
|
||||||
|
app.set :erb_engine_prefix, ::Tilt
|
||||||
|
end
|
||||||
|
|
||||||
|
app.after_configuration do
|
||||||
|
engine = app.settings.erb_engine
|
||||||
|
|
||||||
|
if engine.is_a? Symbol
|
||||||
|
engine = app.tilt_template_from_symbol(engine)
|
||||||
|
end
|
||||||
|
|
||||||
|
::Tilt.prefer(engine)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
alias :included :registered
|
||||||
|
end
|
||||||
|
|
||||||
|
module ClassMethods
|
||||||
|
def tilt_template_from_symbol(engine)
|
||||||
|
engine = engine.to_s
|
||||||
|
engine = engine == "erb" ? "ERB" : engine.camelize
|
||||||
|
settings.erb_engine_prefix.const_get("#{engine}Template")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -55,11 +55,11 @@ eos
|
||||||
s.add_dependency("padrino-core", ["~> 0.10.5"])
|
s.add_dependency("padrino-core", ["~> 0.10.5"])
|
||||||
s.add_dependency("padrino-helpers", ["~> 0.10.5"])
|
s.add_dependency("padrino-helpers", ["~> 0.10.5"])
|
||||||
|
|
||||||
s.add_dependency("eventmachine", ["1.0.0.beta.3"])
|
s.add_dependency("eventmachine", ["1.0.0.beta.4.1"])
|
||||||
s.add_dependency("win32-process", ["~> 0.6.5"])
|
s.add_dependency("win32-process", ["~> 0.6.5"])
|
||||||
s.add_dependency("rb-fchange")
|
s.add_dependency("rb-fchange")
|
||||||
|
|
||||||
s.add_dependency("guard", ["~> 0.6.2"])
|
s.add_dependency("guard", ["~> 0.8.8"])
|
||||||
s.add_dependency("middleman-livereload", ["~> 0.2.0"])
|
s.add_dependency("middleman-livereload", ["~> 0.2.0"])
|
||||||
|
|
||||||
# Development and test
|
# Development and test
|
||||||
|
|
|
@ -57,7 +57,7 @@ eos
|
||||||
s.add_dependency("padrino-core", ["~> 0.10.5"])
|
s.add_dependency("padrino-core", ["~> 0.10.5"])
|
||||||
s.add_dependency("padrino-helpers", ["~> 0.10.5"])
|
s.add_dependency("padrino-helpers", ["~> 0.10.5"])
|
||||||
|
|
||||||
s.add_dependency("guard", ["~> 0.6.2"])
|
s.add_dependency("guard", ["~> 0.8.8"])
|
||||||
s.add_dependency("middleman-livereload", ["~> 0.2.0"])
|
s.add_dependency("middleman-livereload", ["~> 0.2.0"])
|
||||||
|
|
||||||
# Development and test
|
# Development and test
|
||||||
|
|
Loading…
Reference in a new issue