Update global options and command descriptions
This commit is contained in:
parent
3b4feb41f0
commit
72f99eb8a7
15
bin/jekyll2
15
bin/jekyll2
|
@ -11,8 +11,11 @@ program :version, Jekyll::VERSION
|
||||||
program :description, 'Jekyll is a blog-aware, static site generator in Ruby'
|
program :description, 'Jekyll is a blog-aware, static site generator in Ruby'
|
||||||
|
|
||||||
# Global options available to every command
|
# Global options available to every command
|
||||||
global_option '-s', '--source DIR', String, 'Source directory'
|
global_option '-s', '--source [DIR]', 'Source directory (defaults to ./)'
|
||||||
global_option '-d', '--destination DIR', String, 'Destination directory'
|
global_option '-d', '--destination [DIR]', 'Destination directory (defaults to ./_site)'
|
||||||
|
global_option '--safe', 'Safe mode (defaults to false)'
|
||||||
|
global_option '--plugins', 'Plugins directory (defaults to ./_plugins)'
|
||||||
|
global_option '--layouts', 'Layouts directory (defaults to ./_layouts)'
|
||||||
|
|
||||||
# Build command
|
# Build command
|
||||||
#
|
#
|
||||||
|
@ -22,10 +25,9 @@ global_option '-d', '--destination DIR', String, 'Destination directory'
|
||||||
# --watch
|
# --watch
|
||||||
command :build do |c|
|
command :build do |c|
|
||||||
c.syntax = 'jekyll build [options]'
|
c.syntax = 'jekyll build [options]'
|
||||||
c.description = 'Build...'
|
c.description = 'Build your site with the option of auto-renegeration'
|
||||||
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
||||||
c.action do |args, options|
|
c.action do |args, options|
|
||||||
options.default :watch => false
|
|
||||||
Jekyll::BuildCommand.process(options)
|
Jekyll::BuildCommand.process(options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -42,14 +44,13 @@ end
|
||||||
# --baseurl
|
# --baseurl
|
||||||
command :serve do |c|
|
command :serve do |c|
|
||||||
c.syntax = 'jekyll serve [options]'
|
c.syntax = 'jekyll serve [options]'
|
||||||
c.description = 'Serve...'
|
c.description = 'Serve your site locally with the option of auto-regeneration'
|
||||||
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
||||||
c.option '-p', '--port [PORT]', 'Port to listen on'
|
c.option '-p', '--port [PORT]', 'Port to listen on'
|
||||||
c.option '-h', '--host [HOST]', 'Host to bind to'
|
c.option '-h', '--host [HOST]', 'Host to bind to'
|
||||||
c.option '-b', '--baseurl [URL]', 'Base URL'
|
c.option '-b', '--baseurl [URL]', 'Base URL'
|
||||||
c.action do |args, options|
|
c.action do |args, options|
|
||||||
options.default :watch => false,
|
options.default :port => '4000',
|
||||||
:port => '4000',
|
|
||||||
:host => '0.0.0.0',
|
:host => '0.0.0.0',
|
||||||
:baseurl => '/',
|
:baseurl => '/',
|
||||||
:serving => true
|
:serving => true
|
||||||
|
|
Loading…
Reference in New Issue