Update bower.json to use one JS file #812

This commit is contained in:
Gleb Mazovetskiy 2015-01-14 21:38:39 +00:00
Родитель 06629e712d
Коммит b4c0349be3
2 изменённых файлов: 3 добавлений и 16 удалений

Просмотреть файл

@ -15,18 +15,8 @@
"assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
"assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
"assets/javascripts/bootstrap/affix.js",
"assets/javascripts/bootstrap/alert.js",
"assets/javascripts/bootstrap/button.js",
"assets/javascripts/bootstrap/carousel.js",
"assets/javascripts/bootstrap/collapse.js",
"assets/javascripts/bootstrap/dropdown.js",
"assets/javascripts/bootstrap/tab.js",
"assets/javascripts/bootstrap/transition.js",
"assets/javascripts/bootstrap/scrollspy.js",
"assets/javascripts/bootstrap/modal.js",
"assets/javascripts/bootstrap/tooltip.js",
"assets/javascripts/bootstrap/popover.js"
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff2",
"assets/javascripts/bootstrap.js"
],
"keywords": [
"twbs",

Просмотреть файл

@ -15,14 +15,11 @@ namespace :bower do
require 'bootstrap-sass'
Dir.chdir Bootstrap.gem_path do
spec = JSON.parse(File.read 'bower.json')
js_paths = File.read(File.join Bootstrap.javascripts_path, 'bootstrap-sprockets.js').lines.map do |line|
line.strip if line.sub!(%r(//\s*=\s*require\s*(?:./)?(.*)\s*), 'assets/javascripts/\1.js')
end.compact
spec['main'] =
find_files.(File.join(Bootstrap.stylesheets_path, '_bootstrap.scss')) +
find_files.(Bootstrap.fonts_path) +
js_paths
%w(assets/javascripts/bootstrap.js)
spec['version'] = Bootstrap::VERSION[0..-3]