Sha256: 643351c17d28f219f403368cccc77a3854a6b977de487400e21c372c689def2e

Contents?: true

Size: 1.33 KB

Versions: 10

Compression:

Stored size: 1.33 KB

Contents

#!/usr/bin/env ruby
STDOUT.sync = true

$:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })

require 'jekyll'
require 'mercenary'

Jekyll::External.require_if_present(
  Jekyll::External.blessed_gems
)

Jekyll::PluginManager.require_from_bundler

Jekyll::Deprecator.process(ARGV)

Mercenary.program(:jekyll) do |p|
  p.version Jekyll::VERSION
  p.description 'Jekyll is a blog-aware, static site generator in Ruby'
  p.syntax 'jekyll <subcommand> [options]'

  p.option 'source', '-s', '--source [DIR]', 'Source directory (defaults to ./)'
  p.option 'destination', '-d', '--destination [DIR]', 'Destination directory (defaults to ./_site)'
  p.option 'safe', '--safe', 'Safe mode (defaults to false)'
  p.option 'plugins_dir', '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
  p.option 'layouts_dir', '--layouts DIR', String, 'Layouts directory (defaults to ./_layouts)'
  p.option 'profile', '--profile', 'Generate a Liquid rendering profile'

  Jekyll::Command.subclasses.each { |c| c.init_with_program(p) }

  p.action do |args, options|
    if args.empty?
      Jekyll.logger.error "A subcommand is required."
      puts p
      abort
    else
      unless p.has_command?(args.first)
        Jekyll.logger.abort_with "Invalid command. Use --help for more information"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jekyll-3.0.5 bin/jekyll
jekyll-3.0.4 bin/jekyll
jekyll-3.0.3 bin/jekyll
jekyll-3.0.2 bin/jekyll
jekyll-3.1.0.pre.beta1 bin/jekyll
jekyll-3.0.1 bin/jekyll
jekyll-3.0.0 bin/jekyll
jekyll-3.0.0.pre.rc1 bin/jekyll
jekyll-3.0.0.pre.beta10 bin/jekyll
jekyll-3.0.0.pre.beta9 bin/jekyll