Sha256: 56ce9fbe6161cc3b6a226a774de6776a6c688b331baea6d605527a3d029c0c17

Contents?: true

Size: 938 Bytes

Versions: 13

Compression:

Stored size: 938 Bytes

Contents

require 'rubygems'
require 'gamefic-sdk'
require 'rake'

module Gamefic::Sdk::Tasks
  autoload :Common, 'gamefic-sdk/tasks/common'
  autoload :Ruby,   'gamefic-sdk/tasks/ruby'
  autoload :Web,    'gamefic-sdk/tasks/web'

  module_function

  def define_all
    define_task 'ruby:run', 'Run a Ruby CLI app' do
      Ruby.new.run
    end

    define_task 'ruby:build', 'Build a distributable CLI app' do
      Ruby.new.build
    end

    define_task 'web:generate', 'Generate a web app' do
      Web.new.generate
    end

    define_task 'web:run', 'Run a standalone web app' do
      Web.new.run
    end

    define_task 'web:build', 'Build a distributable web app' do
      Web.new.build
    end
  end

  def define_task name, desc, &block
    return if Rake::Task.task_defined?(name)
    # @type [Rake::Task]
    task = Rake::Task.define_task(name, &block)
    task.add_description desc
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gamefic-sdk-2.5.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.4.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.3.3 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.3.2 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.3.1 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.3.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.2.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.1.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.0.4 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.0.3 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.0.2 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.0.1 lib/gamefic-sdk/tasks.rb
gamefic-sdk-2.0.0 lib/gamefic-sdk/tasks.rb