Sha256: 96b9876c03a64cb25e036edf4d322486075eb13a97dc114319f645988240eed4
Contents?: true
Size: 1.71 KB
Versions: 1
Compression:
Stored size: 1.71 KB
Contents
# # Rake / Cordova # task default: [:compile] task :greet do puts Paint["Cordova Rake [#{env}] #{ENV['CORDOVA_PLATFORMS']}", :red] puts Paint[' ----', :red] end desc 'Setup env for development' task :setup do puts Paint['Installing NPM stuff...', :red] sh 'npm -g install phonegap cordova coffee-script ' sh 'npm -g install ios-deploy ios-sim ' if RUBY_PLATFORM =~ /darwin/ puts Paint['Installing GEM stuff...', :red] sh 'gem install haml sass yamg guard guard-coffeelint' end task :report do puts Paint['----', :red] puts Paint["Rake done! #{format('%.2f', Time.now - START)}s", :black] end desc 'Phonegap Dev App, optional: port.' task :serve do port = ARGV.last.to_i port = 4000 if port.zero? sh "phonegap serve -p #{port}" end desc 'Prepare & Ripple emulate' task :ripple do sh 'cordova prepare' sh 'ripple emulate' end desc 'Prepare & Ripple emulate' task :guard do if File.exist?('Guardfile') puts 'Guardfile already exists.' else puts 'Creating Guardfile...' FileUtils.cp(File.join(__FILE__, '..', 'templates', 'Guardfile'), '.') end end namespace :emulate do desc 'Run on Android emulator' task :android do sh 'cordova build android' sh "cordova emulate android --target #{ARGV[1]}" end task android: :compile desc 'Run on iOS emulator' task :ios do sh 'cordova build ios' sh 'cordova emulate ios' end task ios: :compile end namespace :run do desc 'Run on Android device or emulator' task :android do sh 'cordova build android' sh 'cordova run android' end task android: :compile desc 'Run on iOS plugged device or emulator' task :ios do sh 'cordova build ios' sh 'cordova run ios --device' end task ios: :compile end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cordova-rake-0.3.1 | lib/tasks/cordova.rake |