Make i18n a normal extension with options
This commit is contained in:
parent
64f84bacd2
commit
d79acc7a78
8 changed files with 47 additions and 59 deletions
|
@ -2,18 +2,8 @@
|
|||
require 'thor'
|
||||
require "thor/group"
|
||||
|
||||
# Core Pathname library used for traversal
|
||||
require "pathname"
|
||||
|
||||
# CLI Module
|
||||
module Middleman
|
||||
|
||||
# Recursive method to find config.rb
|
||||
def self.locate_root(cwd = Pathname.new(Dir.pwd))
|
||||
return cwd.to_s if File.exists?(File.join(cwd, 'config.rb'))
|
||||
return false if cwd.root?
|
||||
locate_root(cwd.parent)
|
||||
end
|
||||
|
||||
module Cli
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require "middleman-core"
|
||||
|
||||
# CLI Module
|
||||
module Middleman::Cli
|
||||
|
||||
|
|
|
@ -100,9 +100,6 @@ module Middleman
|
|||
# @param [Symbol, Module] ext Which extension to activate
|
||||
# @return [void]
|
||||
def activate(ext, options={}, &block)
|
||||
# Make :i18n a no-op
|
||||
return if ext == :i18n
|
||||
|
||||
ext_module = if ext.is_a?(Module)
|
||||
ext
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue