lib/sprockets.rb in sprockets-4.0.0.beta5 vs lib/sprockets.rb in sprockets-4.0.0.beta6

- old
+ new

@@ -105,14 +105,10 @@ require 'sprockets/source_map_comment_processor' register_pipeline :debug do [SourceMapCommentProcessor] end - require 'sprockets/preprocessors/default_source_map' - register_preprocessor 'text/css', Preprocessors::DefaultSourceMap.new - register_preprocessor 'application/javascript', Preprocessors::DefaultSourceMap.new - require 'sprockets/directive_processor' register_preprocessor 'text/css', DirectiveProcessor.new(comments: ["//", ["/*", "*/"]]) register_preprocessor 'application/javascript', DirectiveProcessor.new(comments: ["//", ["/*", "*/"]]) require 'sprockets/bundle' @@ -121,11 +117,10 @@ register_bundle_metadata_reducer '*/*', :data, proc { String.new("") }, :concat register_bundle_metadata_reducer 'application/javascript', :data, proc { String.new("") }, Utils.method(:concat_javascript_sources) register_bundle_metadata_reducer '*/*', :links, :+ register_bundle_metadata_reducer '*/*', :sources, proc { [] }, :+ - register_bundle_metadata_reducer '*/*', :map, proc { |input| { "version" => 3, "file" => PathUtils.split_subpath(input[:load_path], input[:filename]), "sections" => [] } }, SourceMapUtils.method(:concat_source_maps) require 'sprockets/closure_compressor' require 'sprockets/sass_compressor' require 'sprockets/sassc_compressor' require 'sprockets/jsminc_compressor' @@ -217,6 +212,13 @@ ENV[var] end depend_on 'environment-version' depend_on 'environment-paths' + + require 'sprockets/preprocessors/default_source_map' + register_preprocessor 'text/css', Preprocessors::DefaultSourceMap.new + register_preprocessor 'application/javascript', Preprocessors::DefaultSourceMap.new + + register_bundle_metadata_reducer 'text/css', :map, proc { |input| { "version" => 3, "file" => PathUtils.split_subpath(input[:load_path], input[:filename]), "sections" => [] } }, SourceMapUtils.method(:concat_source_maps) + register_bundle_metadata_reducer 'application/javascript', :map, proc { |input| { "version" => 3, "file" => PathUtils.split_subpath(input[:load_path], input[:filename]), "sections" => [] } }, SourceMapUtils.method(:concat_source_maps) end