Top Level Namespace

Defined Under Namespace

Modules: Sprout Classes: Dir, String

Instance Method Summary (collapse)

Instance Method Details

- (Object) library(pkg_name, name = nil, version = nil)

From within a Rakefile, you can load libraries by calling this method:


  library :asunit4

Or, if you would like to specify which registered library to pull from the identified package (by name):


  library :asunit4, :src

Or, if you’d like to specify version requirements:


  library :asunit4, :swc, '>= 4.2.pre'

It’s important to note that libraries must also be defined in your Gemfile like:


  gem "asunit4", ">= 4.2.pre"

Libraries are generally then added to compiler tasks as Rake dependencies like:


  mxmlc 'bin/SomeRunner.swf' => [:asunit4] do |t|
    t.input = 'src/SomeRunner.as'
    t.source_path << 'test'
  end


293
294
295
# File 'lib/sprout/library.rb', line 293

def library pkg_name, name=nil, version=nil
  Sprout::Library.define_task name, pkg_name, version
end