Skip to content

Instantly share code, notes, and snippets.

@michael-erasmus
Created September 11, 2012 13:09
Show Gist options
  • Save michael-erasmus/3698332 to your computer and use it in GitHub Desktop.
Save michael-erasmus/3698332 to your computer and use it in GitHub Desktop.
Setup lib directory dependencies in Rakefile for Rubymotion
Motion::Project::App.setup do |app|
# This will make sure that each *.rb file in your app/controllers, app/models and app/views
# depends on all the *.rb files in your app/lib
app_files = Dir.glob(File.join(app.project_dir, 'app/{controllers,models,views}/**/*.rb'))
lib_files = Dir.glob(File.join(app.project_dir, 'app/lib/**/*.rb'))
app.files_dependencies(app_files.inject({}){|h, f| h[f] = lib_files;h})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment