Sha256: f4238abad26de545d910d48ca9560945bbb675653ecef46636dcfed94c11a1fe

Contents?: true

Size: 731 Bytes

Versions: 11

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module RubyNPM
  module Commands
    class RunScript < Base
      # @!visibility private
      def subcommands
        %w[run-script]
      end

      # @!visibility private
      def options
        super +
          Options::Sets::WORKSPACE_OPTIONS +
          Options::Sets::LOGGING_OPTIONS +
          Options::Sets::GLOBAL_OPTIONS +
          Options::Sets::OUTPUT_OPTIONS +
          %w[
            --if-present
            --parseable
          ]
      end

      def arguments(parameters)
        script_arguments =
          parameters[:arguments] ? ['--'] + parameters[:arguments] : []

        [parameters[:script]] + script_arguments
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_npm-0.2.0.pre.2 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.2.0.pre.1 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.14 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.13 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.12 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.11 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.10 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.9 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.8 lib/ruby_npm/commands/run_script.rb
ruby_npm-0.1.0.pre.7 lib/ruby_npm/commands/run_script.rb