Sha256: dc6f09b8d8c6858a3f26c81c876979f077c2e8b3196a24aca8047e121ed37d71

Contents?: true

Size: 940 Bytes

Versions: 4

Compression:

Stored size: 940 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

4 entries across 4 versions & 1 rubygems

Version Path
gamefic-sdk-3.2.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-3.1.0 lib/gamefic-sdk/tasks.rb
gamefic-sdk-3.0.1 lib/gamefic-sdk/tasks.rb
gamefic-sdk-3.0.0 lib/gamefic-sdk/tasks.rb