tidy up logic
- the extension template already had a gitignore
This commit is contained in:
parent
772de85ce3
commit
9fb4470248
|
@ -27,7 +27,7 @@ module Middleman::Cli
|
|||
# The extension task
|
||||
# @param [String] name
|
||||
def extension
|
||||
generate_gitignore!
|
||||
copy_file 'extension/gitignore', File.join(name, '.gitignore') unless options[:'skip-git']
|
||||
template 'extension/Rakefile', File.join(name, 'Rakefile')
|
||||
template 'extension/gemspec', File.join(name, "#{name}.gemspec")
|
||||
template 'extension/Gemfile', File.join(name, 'Gemfile')
|
||||
|
@ -40,14 +40,5 @@ module Middleman::Cli
|
|||
# Output a .gitignore file
|
||||
class_option :git, :type => :boolean, :default => true
|
||||
|
||||
no_tasks {
|
||||
# Write a .gitignore file for project
|
||||
# @return [void]
|
||||
def generate_gitignore!
|
||||
return if options[:'skip-git']
|
||||
copy_file 'shared/gitignore', File.join(name, '.gitignore')
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue