Sha256: 0ec83f1a8accd6492827314877ba9905fe3400bc5abbc0751b45e59ab914a53d

Contents?: true

Size: 936 Bytes

Versions: 6

Compression:

Stored size: 936 Bytes

Contents

module Octopress
  class Serve < Command
    def self.init_with_program(p)
      p.command(:serve) do |c|
        c.alias(:server)

        c.syntax 'serve [options]'
        c.description 'Serve your site locally'

        CommandHelpers.add_build_options(c)

        c.option 'detach', '-B', '--detach',      'Run the server in the background (detach)'
        c.option 'port',   '-P', '--port PORT',   'Port to listen on'
        c.option 'host',   '-H', '--host HOST',   'Host to bind to'
        c.option 'baseurl',      '--baseurl URL', 'Base URL'

        c.action do |args, options|
          Octopress.config(options)
          options["serving"] ||= true

          options = CommandHelpers.normalize_options(options)
          options = Jekyll.configuration(options.to_symbol_keys)
          Jekyll::Commands::Build.process(options)
          Jekyll::Commands::Serve.process(options)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
octopress-3.0.0.rc.8 lib/octopress/commands/serve.rb
octopress-3.0.0.rc.7 lib/octopress/commands/serve.rb
octopress-3.0.0.rc.6 lib/octopress/commands/serve.rb
octopress-3.0.0.rc.5 lib/octopress/commands/serve.rb
octopress-3.0.0.rc.4 lib/octopress/commands/serve.rb
octopress-3.0.0.rc.3 lib/octopress/commands/serve.rb