Method: Manoku::Application#init

Defined in:
lib/manoku/application.rb

#init(base = nil) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/manoku/application.rb', line 13

def init(base=nil)
  base = workdir unless base
  Git.init(base)
  Dir.mkdir(appsdir)
  FileUtils.touch("#{appsdir}/.gitkeep")
  File.open("#{base}/.gitignore", "w") do |file|
    file << "apps/*.json"
  end
end