class Object
Constants
- START
Public Instance Methods
app()
click to toggle source
# File lib/cordova/rake.rb, line 36 def app config(:app) end
config(key)
click to toggle source
# File lib/cordova/rake.rb, line 21 def config(key) return @xml[key] if @xml xml = Nokogiri::XML(File.open('config.xml')) @xml = { app: xml.xpath('//xmlns:name').text, desc: xml.xpath('//xmlns:description').text, platforms: xml.xpath('//xmlns:platform').map { |os| os['name'] } } config(key) end
env()
click to toggle source
# File lib/cordova/rake.rb, line 40 def env @env ||= ENV['TARGET'] || 'development' end
get_sources(ext, dir = 'app')
click to toggle source
Some helper methods
# File lib/cordova/rake.rb, line 13 def get_sources(ext, dir = 'app') Rake::FileList.new("#{dir}/**/*.#{ext}") do |fl| fl.exclude('~*') fl.exclude(%r{^scratch/}) # fl.exclude { |f| `git ls-files #{f}`.empty? } # Only commited end end
layout()
click to toggle source
# File lib/cordova/rake.rb, line 32 def layout @layout ||= Tilt.new(Dir['app/html/layout.*'].first) end