Sha256: 367d6ebde3e4d652c74c69c060e3eb49e6cd9f718401e9cc16712820974a1e57

Contents?: true

Size: 789 Bytes

Versions: 2

Compression:

Stored size: 789 Bytes

Contents

require "thor"

module Kanji
  class CLI < Thor
    desc "new APP", "Generate a new Kanji project"
    def new(app_name)
      require "kanji/generators/project"
      Generators::Project.new(app_name).call
    end

    map "n" => "new"

    desc "generate GENERATOR", "Generate a new item for this project"
    require "kanji/cli/generate"
    subcommand "generate", CLI::Generate

    map "g" => "generate"

    desc "server", "Start the application server"
    def server
      `shotgun config.ru`
    end

    map "s" => "server"

    desc "console", "Open up the application console"
    def console
      require "bundler/setup"
      require "dry/web/console"
      require_relative "#{Dir.pwd}/system/boot"
      Dry::Web::Console.start
    end

    map "c" => "console"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kanji-web-0.2.2 lib/kanji/cli.rb
kanji-web-0.2.1 lib/kanji/cli.rb