Sha256: 2320ffd7b49eb37dbed48b6e6b6777cc25abba932409a8562008f7aeb03f4301

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

# frozen_string_literal: true

require "tty-prompt"

module RailsApp
  class CLI
    def self.start
      prompt = TTY::Prompt.new

      app_name = prompt.ask("What is the name of your application?", required: true)
      assets = prompt.select("How would you like to manage assets?", %w[propshaft sprockets])
      styling_choices = [
        {name: "Bootstrap", value: "bootstrap"},
        {name: "Tailwind CSS", value: "tailwindcss", disabled: "(coming soon)"},
        {name: "Bulma", value: "bulma", disabled: "(coming soon)"},
        {name: "PostCSS", value: "postcss", disabled: "(coming soon)"},
        {name: "SASS", value: "sass"}
      ]
      styling = prompt.select("How would you like to manage styling?", styling_choices)

      Command.new(app_name: app_name, assets: assets, styling: styling).run
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_app-0.3.0 lib/rails_app/cli.rb