Sha256: 3e486b2ec6ff426edc7219d5d0d48c62227507e37ca1b99999e23a14d887726a

Contents?: true

Size: 366 Bytes

Versions: 24

Compression:

Stored size: 366 Bytes

Contents

module StaticMatic::SetupMixin
  
  def setup
    Dir.mkdir(@base_dir) unless File.exists?(@base_dir)
    
    Dir[File.join(File.dirname(__FILE__), "..", "templates", "project", "*")].each do |template|
      begin
        FileUtils.cp_r(template, @base_dir)
      rescue Errno::EEXIST
        # ignore - template exists
      end
    end

    puts "Done"
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
staticmatic-0.11.0.alpha.4 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.3 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.1 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.0 lib/staticmatic/mixins/setup.rb