diff --git a/spec/amber/cli/commands/pipelines/pipelines_spec.cr b/spec/amber/cli/commands/pipelines/pipelines_spec.cr index 0328307bf..69b108c83 100644 --- a/spec/amber/cli/commands/pipelines/pipelines_spec.cr +++ b/spec/amber/cli/commands/pipelines/pipelines_spec.cr @@ -28,7 +28,6 @@ module Amber::CLI Amber::Pipe::Session Amber::Pipe::Flash Amber::Pipe::CSRF - Amber::Pipe::Reload ) static_default_plugs = %w( diff --git a/src/amber/cli/templates/app/config/routes.cr b/src/amber/cli/templates/app/config/routes.cr index f016ba192..0c9e0e3f3 100644 --- a/src/amber/cli/templates/app/config/routes.cr +++ b/src/amber/cli/templates/app/config/routes.cr @@ -10,8 +10,6 @@ Amber::Server.configure do plug Amber::Pipe::Session.new plug Amber::Pipe::Flash.new plug Amber::Pipe::CSRF.new - # Reload clients browsers (development only) - plug Amber::Pipe::Reload.new if Amber.env.development? end pipeline :api do diff --git a/src/amber/pipes/reload.cr b/src/amber/pipes/reload.cr deleted file mode 100644 index 26effc5cf..000000000 --- a/src/amber/pipes/reload.cr +++ /dev/null @@ -1,26 +0,0 @@ -require "../../support/client_reload" - -module Amber - module Pipe - # Reload clients browsers using `ClientReload`. - # - # NOTE: Amber::Pipe::Reload is intended for use in a development environment. - # ``` - # pipeline :web do - # plug Amber::Pipe::Reload.new - # end - # ``` - class Reload < Base - def initialize(@env : Amber::Environment::Env = Amber.env) - Support::ClientReload.new - end - - def call(context : HTTP::Server::Context) - if @env.development? && context.format == "html" - context.response << Support::ClientReload::INJECTED_CODE - end - call_next(context) - end - end - end -end