Skip to content

Instantly share code, notes, and snippets.

@kfatehi
Created July 7, 2012 01:16
Show Gist options
  • Save kfatehi/3063696 to your computer and use it in GitHub Desktop.
Save kfatehi/3063696 to your computer and use it in GitHub Desktop.
def write_manifest
correct_load_order_array = []
load_last = []
@require_libs_hash.each do |root_file, nested_requires|
# Fix path for root files (needed since we derive from path and not a #require line)
load_last << root_file.gsub(lib_folder+File::SEPARATOR, '')
correct_load_order_array << nested_requires.reverse.flatten
end
load_last.reverse.each do |root_file|
correct_load_order_array << root_file
end
correct_load_order_array.flatten!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment