Created
September 11, 2012 13:09
-
-
Save michael-erasmus/3698332 to your computer and use it in GitHub Desktop.
Setup lib directory dependencies in Rakefile for Rubymotion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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