Using modularized commands (Jekyll::Commands) as per @tombell's latest PR merge
This commit is contained in:
parent
f3856a444a
commit
a8671ed52b
|
@ -22,7 +22,7 @@ command :new do |c|
|
||||||
c.description = 'Creates a new Jekyll site scaffold in PATH'
|
c.description = 'Creates a new Jekyll site scaffold in PATH'
|
||||||
|
|
||||||
c.action do |args, options|
|
c.action do |args, options|
|
||||||
Jekyll::NewCommand.process(args)
|
Jekyll::Commands::New.process(args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class NewCommand < Command
|
module Commands
|
||||||
|
class New < Command
|
||||||
|
|
||||||
def self.process(args)
|
def self.process(args)
|
||||||
path = File.expand_path(args.join(" "), Dir.pwd)
|
path = File.expand_path(args.join(" "), Dir.pwd)
|
||||||
|
@ -29,3 +30,4 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue