mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Don't catch CoffeeScript errors when in build mode. Fixes #551
This commit is contained in:
parent
2f7371ca1f
commit
6ccf5e2db0
3 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
Master
|
Master
|
||||||
===
|
===
|
||||||
|
|
||||||
|
* Don't catch CoffeeScript errors when in build mode.
|
||||||
* Extract load_paths so they aren't locked into the binary
|
* Extract load_paths so they aren't locked into the binary
|
||||||
* Add middleman/rack for better config.ru support
|
* Add middleman/rack for better config.ru support
|
||||||
* Use centralized Logger and add benchmark methods
|
* Use centralized Logger and add benchmark methods
|
||||||
|
|
|
@ -29,6 +29,8 @@ module Middleman
|
||||||
# @param [Hash] locals
|
# @param [Hash] locals
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def evaluate(context, locals, &block)
|
def evaluate(context, locals, &block)
|
||||||
|
return super if context.build?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
super
|
super
|
||||||
rescue ::ExecJS::RuntimeError => e
|
rescue ::ExecJS::RuntimeError => e
|
||||||
|
|
|
@ -14,4 +14,9 @@ Feature: Support coffee-script
|
||||||
Scenario: Rendering broken coffee
|
Scenario: Rendering broken coffee
|
||||||
Given the Server is running at "coffeescript-app"
|
Given the Server is running at "coffeescript-app"
|
||||||
When I go to "/javascripts/broken-coffee.js"
|
When I go to "/javascripts/broken-coffee.js"
|
||||||
Then I should see "reserved word"
|
Then I should see "reserved word"
|
||||||
|
|
||||||
|
Scenario: Building broken coffee
|
||||||
|
Given a built app at "coffeescript-app"
|
||||||
|
Then the output should contain "error build/javascripts/broken-coffee.js"
|
||||||
|
And the exit status should be 1
|
Loading…
Reference in a new issue