Class: Miyano::Build
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Miyano::Build
- Defined in:
- lib/miyano/cli/build.rb
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
21 22 23 |
# File 'lib/miyano/cli/build.rb', line 21 def build Builder.new.build_the_world end |
#check_root ⇒ Object
3 4 5 6 7 |
# File 'lib/miyano/cli/build.rb', line 3 def check_root unless Dir.exist?("post") and Dir.exist?("layout") fail "!!wrong dirctory" end end |
#clean ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/miyano/cli/build.rb', line 9 def clean if Dir.exist?("_site") FileUtils.cd "_site" do files = Dir["*"] files.delete "CNAME" files.each do |f| FileUtils.rm_rf f end end end end |