Skip to content

Instantly share code, notes, and snippets.

@parkr
Created December 17, 2012 01:22
Show Gist options
  • Save parkr/4315088 to your computer and use it in GitHub Desktop.
Save parkr/4315088 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
$:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
require 'commander/import'
require 'jekyll'
program :name, 'jekyll'
program :version, Jekyll::VERSION
program :description, 'Jekyll is a blog-aware, static site generator in Ruby'
default_command :build
command :build do |c|
c.syntax = 'jekyll build'
c.description = '...'
c.option '--src DIR', String, 'Source directory'
c.option '--dest DIR', String, 'Destination directory'
# c.option ...
c.action do |args, options|
# Jekyll::Commands::Build.process(options)
end
end
command :serve do |c|
c.syntax = 'jekyll serve'
c.description = '...'
# c.option ...
c.action do |args, options|
# Jekyll::Commands::Build.process(options)
# Jekyll::Commands::Serve.process(options)
end
end
command :migrate do |c|
c.syntax = 'jekyll migrate'
c.description = '...'
# c.option ...
c.action do |args, options|
# Jekyll::Commands::Migrate.process(options)
end
end
command :generate do |c|
c.syntax = 'jekyll generate'
c.description = '...'
# c.option ...
c.action do |args, options|
# Jekyll::Commands::Generate.process(options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment