Sha256: 89c40780ffc1d207fdb3dcaf8ebe2b699a71e46cf8247d17650beafea24de8e9

Contents?: true

Size: 1.33 KB

Versions: 5

Compression:

Stored size: 1.33 KB

Contents

module Wordless
  class CLI < Thor
    include Thor::Actions
    include WordPressTools::SharedOptions

    no_tasks do
      def wordless_cli
        Wordless::WordlessCLI.new(self, options)
      end
    end

    desc "new [NAME]", "Download WordPress in specified directory, install the Wordless plugin and create a Wordless theme"
    add_method_options(shared_options)
    method_option :bare, type: :boolean, aliases: "-b", desc: "Remove default themes and plugins", default: true
    def new(name)
      wordless_cli.start(name)
    end

    desc "install", "Install the Wordless plugin into an existing WordPress installation"
    def install
      wordless_cli.install_wordless
    end

    desc "theme [NAME]", "Create a new Wordless theme NAME"
    def theme(name)
      wordless_cli.create_theme(name)
    end

    desc "compile", "Compile static assets"
    def compile
      wordless_cli.compile
    end

    desc "clean", "Clean static assets"
    def clean
      wordless_cli.clean
    end

    desc "deploy", "Deploy your WordPress site using the deploy_command defined in your Wordfile"
    method_option :refresh, aliases: "-r", desc: "Compile static assets before deploying and clean them afterwards"
    method_option :command, aliases: "-c", desc: "Use a custom deploy command"
    def deploy
      wordless_cli.deploy
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wordless-1.1.6 lib/wordless/cli.rb
wordless-1.1.5 lib/wordless/cli.rb
wordless-1.1.2 lib/wordless/cli.rb
wordless-1.1.1 lib/wordless/cli.rb
wordless-1.1.0 lib/wordless/cli.rb