Sha256: 7355043aebc2abfebfd249ac054b8b5b5b6e1e1927a4ca5b12b7c6c61ef8c195

Contents?: true

Size: 904 Bytes

Versions: 11

Compression:

Stored size: 904 Bytes

Contents

require 'fileutils'
module HighFive
  module Thor
    module Tasks
      class Initialization < ::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

11 entries across 11 versions & 1 rubygems

Version Path
high_five-0.2.10 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.9 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.8 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.7 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.6 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.5 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.4 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.3 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.2 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.1 lib/high_five/thor/tasks/initialization.rb
high_five-0.2.0 lib/high_five/thor/tasks/initialization.rb