Skip to content

Instantly share code, notes, and snippets.

@Watson1978
Created May 9, 2012 01:31
Show Gist options
  • Save Watson1978/2640999 to your computer and use it in GitHub Desktop.
Save Watson1978/2640999 to your computer and use it in GitHub Desktop.
$:.unshift("/Library/RubyMotion/lib")
task :default => [:check_syntax, :simulator]
require 'motion/project'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'test'
end
desc "Checks the syntax"
task :check_syntax do
Motion::Project::App.setup do |app|
app.files.each do |file|
result = `macruby -c #{file}`.chomp
raise "Syntax Error: #{file}" unless result == "Syntax OK"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment