Remove strip_debug
We don't need it as we attach both production and debug versions of Ember.js anyway.
This commit is contained in:
parent
bd950faf4a
commit
b5990032f5
|
@ -64,7 +64,6 @@ input assets.scripts do
|
||||||
|
|
||||||
if assets.production?
|
if assets.production?
|
||||||
match 'min/app.js' do
|
match 'min/app.js' do
|
||||||
strip_debug
|
|
||||||
# uglify squeeze: true
|
# uglify squeeze: true
|
||||||
concat 'app.js'
|
concat 'app.js'
|
||||||
end
|
end
|
||||||
|
|
|
@ -88,21 +88,6 @@ module Travis
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class StripDebug < Rake::Pipeline::Filter
|
|
||||||
def generate_output(inputs, output)
|
|
||||||
inputs.each do |input|
|
|
||||||
source = File.read(input.fullpath)
|
|
||||||
source = strip_debug(source)
|
|
||||||
source = Uglifier.compile(source)
|
|
||||||
output.write source
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def strip_debug(source)
|
|
||||||
source.gsub(%r{^(\s)*Ember\.(assert|deprecate|warn)\((.*)\).*$}, "")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,10 +7,6 @@ module Travis
|
||||||
filter(Filters::Handlebars, *args, &block)
|
filter(Filters::Handlebars, *args, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def strip_debug(*args, &block)
|
|
||||||
filter(Filters::StripDebug, *args, &block)
|
|
||||||
end
|
|
||||||
|
|
||||||
def safe_concat(*args, &block)
|
def safe_concat(*args, &block)
|
||||||
if args.first.kind_of?(Array)
|
if args.first.kind_of?(Array)
|
||||||
filter(Filters::OrderingSafeConcat, *args, &block)
|
filter(Filters::OrderingSafeConcat, *args, &block)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user