Sha256: 3e2063c0faa99a0ab787dafb84fc4064cfdf8e2ef8485d986ab0c4a66d6d2771

Contents?: true

Size: 870 Bytes

Versions: 15

Compression:

Stored size: 870 Bytes

Contents

require "thor"

module Dry
  module Web
    module Roda
      class CLI < Thor
        desc "new APP", "Generate a new dry-web-roda project"
        option :arch, required: false, default: "umbrella", enum: %w[umbrella flat], banner: "ARCH", desc: "Project architecture (umbrella/flat)"
        def new(app_name)
          case options[:arch]
          when "umbrella"
            require "dry/web/roda/generators/umbrella_project"
            Generators::UmbrellaProject.new(app_name).call
          when "flat"
            require "dry/web/roda/generators/flat_project"
            Generators::FlatProject.new(app_name).call
          end
        end

        desc "generate GENERATOR", "Generate a new component for an existing dry-web-roda project"
        require "dry/web/roda/cli/generate"
        subcommand "generate", CLI::Generate
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dry-web-roda-0.14.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.13.1 lib/dry/web/roda/cli.rb
dry-web-roda-0.13.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.12.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.11.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.10.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.9.1 lib/dry/web/roda/cli.rb
dry-web-roda-0.9.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.8.0 lib/dry/web/roda/cli.rb
dry-web-roda-0.7.5 lib/dry/web/roda/cli.rb
dry-web-roda-0.7.4 lib/dry/web/roda/cli.rb
dry-web-roda-0.7.3 lib/dry/web/roda/cli.rb
dry-web-roda-0.7.2 lib/dry/web/roda/cli.rb
dry-web-roda-0.7.1 lib/dry/web/roda/cli.rb
dry-web-roda-0.7.0 lib/dry/web/roda/cli.rb