Module: Stastic::Generator::Default

Extended by:
Default
Included in:
Default
Defined in:
lib/stastic/generators/default.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



19
# File 'lib/stastic/generators/default.rb', line 19

def build; end

#descObject



7
8
9
# File 'lib/stastic/generators/default.rb', line 7

def desc
  "Default Generator"
end

#detectObject



11
12
13
# File 'lib/stastic/generators/default.rb', line 11

def detect
  true
end

#packageObject



21
22
23
# File 'lib/stastic/generators/default.rb', line 21

def package
  Stastic::Generator.package(site_root)
end

#previewObject



25
26
27
28
29
# File 'lib/stastic/generators/default.rb', line 25

def preview
  FileUtils.mkdir_p(site_root)
  server = ::Server.new(site_root, 3000)
  server.start
end

#site_rootObject



15
16
17
# File 'lib/stastic/generators/default.rb', line 15

def site_root
  Stastic::Config.site_root || Dir.pwd
end