Update bower.json to use one JS file #812
This commit is contained in:
Родитель
06629e712d
Коммит
b4c0349be3
14
bower.json
14
bower.json
|
@ -15,18 +15,8 @@
|
||||||
"assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
|
"assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
|
||||||
"assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
|
"assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
|
||||||
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
|
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
|
||||||
"assets/javascripts/bootstrap/affix.js",
|
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff2",
|
||||||
"assets/javascripts/bootstrap/alert.js",
|
"assets/javascripts/bootstrap.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"
|
|
||||||
],
|
],
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"twbs",
|
"twbs",
|
||||||
|
|
|
@ -15,14 +15,11 @@ namespace :bower do
|
||||||
require 'bootstrap-sass'
|
require 'bootstrap-sass'
|
||||||
Dir.chdir Bootstrap.gem_path do
|
Dir.chdir Bootstrap.gem_path do
|
||||||
spec = JSON.parse(File.read 'bower.json')
|
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'] =
|
spec['main'] =
|
||||||
find_files.(File.join(Bootstrap.stylesheets_path, '_bootstrap.scss')) +
|
find_files.(File.join(Bootstrap.stylesheets_path, '_bootstrap.scss')) +
|
||||||
find_files.(Bootstrap.fonts_path) +
|
find_files.(Bootstrap.fonts_path) +
|
||||||
js_paths
|
%w(assets/javascripts/bootstrap.js)
|
||||||
|
|
||||||
spec['version'] = Bootstrap::VERSION[0..-3]
|
spec['version'] = Bootstrap::VERSION[0..-3]
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче