Sha256: 4e24b1419bb17a65595a43f07b471b9387781b620ef0c7ddfb57b50dc145e58a

Contents?: true

Size: 1.72 KB

Versions: 14

Compression:

Stored size: 1.72 KB

Contents

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

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w( .. lib ))

require 'jekyll'
require 'mercenary'

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::External.require_if_present(Jekyll::External.blessed_gems) do |g|
    cmd = g.split('-').last
    p.command(cmd.to_sym) do |c|
      c.syntax cmd
      c.action do
        Jekyll.logger.abort_with "You must install the '#{g}' gem to use the 'jekyll #{cmd}' command."
      end
    end
  end

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

  p.action do |args, _|
    if args.empty?
      Jekyll.logger.error "A subcommand is required."
      puts p
      abort
    else
      subcommand = args.first
      unless p.has_command? subcommand
        Jekyll.logger.abort_with "fatal: 'jekyll #{args.first}' could not" \
          " be found. You may need to install the jekyll-#{args.first} gem" \
          " or a related gem to be able to use this subcommand."
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
blackboard-3.1.9 bin/jekyll
jekyll-3.2.0.pre.beta1 bin/jekyll
jekyll-3.1.6 bin/jekyll
jekyll-3.1.5 bin/jekyll
jekyll-3.1.4 bin/jekyll
jekyll-3.1.3 bin/jekyll
jekyll-3.1.2 bin/jekyll
jekyllplusadmin-1.1.0 bin/jekyll
jekyllplusadmin-1.0.0 bin/jekyll
jekyll-3.1.1 bin/jekyll
jekyll-3.1.0 bin/jekyll
jekyll-3.1.0.pre.rc3 bin/jekyll
jekyll-3.1.0.pre.rc2 bin/jekyll
jekyll-3.1.0.pre.rc1 bin/jekyll