Class: Middleman::Cli::Extension
- Inherits:
-
Thor
- Object
- Thor
- Middleman::Cli::Extension
- Includes:
- Thor::Actions
- Defined in:
- lib/middleman-core/cli/extension.rb
Overview
A thor task for creating new projects
Class Method Summary collapse
-
.source_root ⇒ String
Template files are relative to this file.
Instance Method Summary collapse
-
#extension ⇒ Object
The extension task.
Class Method Details
.source_root ⇒ String
Template files are relative to this file
17 18 19 |
# File 'lib/middleman-core/cli/extension.rb', line 17 def self.source_root File.join(File.dirname(__FILE__), "..", "templates", "extension") end |
Instance Method Details
#extension ⇒ Object
The extension task
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/middleman-core/cli/extension.rb', line 25 def extension generate_gitignore! template "Rakefile", File.join(name, "Rakefile") template "gemspec", File.join(name, "#{name}.gemspec") template "Gemfile", File.join(name, "Gemfile") template "lib/middleman_extension.rb", File.join(name, "lib", "middleman_extension.rb") template "lib/lib.rb", File.join(name, "lib", "#{name}.rb") template "features/support/env.rb", File.join(name, "features", "support", "env.rb") empty_directory File.join(name, "fixtures") end |