Skip to content

Instantly share code, notes, and snippets.

@ukabu
Created November 30, 2010 16:24
Show Gist options
  • Save ukabu/721915 to your computer and use it in GitHub Desktop.
Save ukabu/721915 to your computer and use it in GitHub Desktop.
Rakefile to replace Phonegap Makefile (webOS)
require 'rake/clean'
PHONEGAP_SRC = FileList['js/phonegap.js.base', 'js/*.js']
PHONEGAP_JS = 'framework/www/phonegap.js'
SCENE = 'framework/www/app/views/First/First-scene.html'
APP_ID = 'com.palm.yourappid'
IPK = APP_ID + '_1.0.0_all.ipk'
file PHONEGAP_JS => PHONEGAP_SRC do |t|
open(PHONEGAP_JS, 'w') do |f|
PHONEGAP_SRC.each do |s|
f.puts File.read(s)
end
end
end
file SCENE => 'framework/www/index.html' do |t|
mkdir_p File.dirname(SCENE)
cp 'framework/www/index.html', SCENE
end
task 'package' => [PHONEGAP_JS, SCENE] do
sh 'palm-package', 'framework/www'
end
task 'deploy' => ['package'] do |t|
sh 'palm-install', IPK
end
task 'run' => ['deploy'] do |t|
sh 'palm-launch', APP_ID
end
task "default" => ['run']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment