Sha256: d2aad4d362428a06613965dbd80f2cdd9074abe468ad6467bcaf64fb3679b787

Contents?: true

Size: 674 Bytes

Versions: 6

Compression:

Stored size: 674 Bytes

Contents

# frozen_string_literal: true

require "hanami/cli"
require "snowpack/cli/application/command"

module Snowpack
  module CLI
    module Application
      module Commands
        module Assets
          class Clobber < Command
            desc "Delete compiled assets"

            def call(**)
              FileUtils.rm_rf(compiled_assets_path)
              out.puts "=> assets removed from #{compiled_assets_path}"
            end

            private

            def compiled_assets_path
              File.join(application.root, "public/assets")
            end
          end
        end

        register "assets clobber", Assets::Clobber
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
snowpack-1.0.0.alpha7 lib/snowpack/cli/application/commands/assets/clobber.rb
snowpack-1.0.0.alpha6 lib/snowpack/cli/application/commands/assets/clobber.rb
snowpack-1.0.0.alpha5 lib/snowpack/cli/application/commands/assets/clobber.rb
snowpack-1.0.0.alpha4 lib/snowpack/cli/application/commands/assets/clobber.rb
snowpack-1.0.0.alpha3 lib/snowpack/cli/application/commands/assets/clobber.rb
snowpack-1.0.0.alpha2 lib/snowpack/cli/application/commands/assets/clobber.rb