Sha256: 6b818270bdf2927f2f8881eb57a79d8f6fa83d9f8f2dd964668c78258f52503a

Contents?: true

Size: 893 Bytes

Versions: 24

Compression:

Stored size: 893 Bytes

Contents

require 'fileutils'
module HighFive
  module Thor
    module Tasks
      class Init < ::HighFive::Thor::Task
        include ::Thor::Actions
        default_task :init

        desc "init", "Initialize the high_five configuration in the current working directory"
        def init
          self.destination_root = Dir.pwd
          self.source_paths << HighFive::TEMPLATE_PATH

          inside "config" do
            template("high_five.rb")
            inside "high_five" do
              copy_file "index.html.erb", :skip => true
              copy_file "app-common.js", :skip => true

              #TODO make this a CLI argument
              platforms = ["android", "ios"]
              platforms.each do |platform|
                copy_file "app-platform.js", "app-#{platform}.js", :skip => true
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
high_five-0.3.23 lib/high_five/thor/tasks/init.rb
high_five-0.3.22 lib/high_five/thor/tasks/init.rb
high_five-0.3.21 lib/high_five/thor/tasks/init.rb
high_five-0.3.20 lib/high_five/thor/tasks/init.rb
high_five-0.3.19 lib/high_five/thor/tasks/init.rb
high_five-0.3.18 lib/high_five/thor/tasks/init.rb
high_five-0.3.17 lib/high_five/thor/tasks/init.rb
high_five-0.3.16 lib/high_five/thor/tasks/init.rb
high_five-0.3.15 lib/high_five/thor/tasks/init.rb
high_five-0.3.14 lib/high_five/thor/tasks/init.rb
high_five-0.3.13 lib/high_five/thor/tasks/init.rb
high_five-0.3.12 lib/high_five/thor/tasks/init.rb
high_five-0.3.11 lib/high_five/thor/tasks/init.rb
high_five-0.3.10 lib/high_five/thor/tasks/init.rb
high_five-0.3.9 lib/high_five/thor/tasks/init.rb
high_five-0.3.8 lib/high_five/thor/tasks/init.rb
high_five-0.3.7 lib/high_five/thor/tasks/init.rb
high_five-0.3.6 lib/high_five/thor/tasks/init.rb
high_five-0.3.5 lib/high_five/thor/tasks/init.rb
high_five-0.3.4 lib/high_five/thor/tasks/init.rb