Skip to content

Commit

Permalink
popover.js depend on twipsy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Sep 20, 2011
1 parent 720cd3d commit d98c584
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
14 changes: 12 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,19 @@ task "update-twitter" do
cp file, "vendor/assets/javascripts/", :verbose => true
end

bootstrap_js = js_files.map{|f| "//= require #{File.basename(f)}"}.join("\n")
js_priorities = {}
js_files.each {|f| js_priorities[File.basename(f)] = 0}

# popover depend on twipsy
js_priorities["bootstrap-twipsy.js"] = 1
js_priorities["bootstrap-popover.js"] = 2

js_list = js_priorities.to_a.sort {|a,b| a[1] <=> b[1]}.map{|p| p[0]}

File.open("vendor/assets/javascripts/bootstrap.js", "w") do |f|
f.write "// Bootstrap v#{boostrap_version}\n"
f.write(bootstrap_js)
js_list.each do |js|
f.write "//= #{js}\n"
end
end
end
14 changes: 7 additions & 7 deletions vendor/assets/javascripts/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Bootstrap v1.3.0
//= require bootstrap-alerts.js
//= require bootstrap-dropdown.js
//= require bootstrap-modal.js
//= require bootstrap-popover.js
//= require bootstrap-scrollspy.js
//= require bootstrap-tabs.js
//= require bootstrap-twipsy.js
//= bootstrap-alerts.js
//= bootstrap-dropdown.js
//= bootstrap-modal.js
//= bootstrap-tabs.js
//= bootstrap-scrollspy.js
//= bootstrap-twipsy.js
//= bootstrap-popover.js
2 changes: 1 addition & 1 deletion vendor/assets/stylesheets/bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: 2011-09-20 11:28:01 +0400
* Date: 2011-09-20 15:59:51 +0400
*/

// CSS Reset
Expand Down

0 comments on commit d98c584

Please sign in to comment.