]> git.openstreetmap.org Git - rails.git/blob - Vendorfile
Properly include iD's external data files
[rails.git] / Vendorfile
1 folder 'vendor/assets' do
2   folder 'jquery' do
3     file 'jquery.cookie.js', 'https://raw.githubusercontent.com/carhartl/jquery-cookie/master/src/jquery.cookie.js'
4     file 'jquery.throttle-debounce.js', 'https://raw.githubusercontent.com/cowboy/jquery-throttle-debounce/v1.1/jquery.ba-throttle-debounce.js'
5     file 'jquery.simulate.js', 'https://raw.githubusercontent.com/jquery/jquery-simulate/1.0.0/jquery.simulate.js'
6   end
7
8   folder 'leaflet' do
9     file 'leaflet.js', 'https://unpkg.com/leaflet@1.6.0/dist/leaflet-src.js'
10     file 'leaflet.css', 'https://unpkg.com/leaflet@1.6.0/dist/leaflet.css'
11
12     [ 'layers.png', 'layers-2x.png',
13       'marker-icon.png', 'marker-icon-2x.png',
14       'marker-shadow.png' ].each do |image|
15       file "images/#{image}", "https://unpkg.com/leaflet@1.6.0/dist/images/#{image}"
16     end
17
18     from 'git://github.com/aratcliffe/Leaflet.contextmenu.git', :tag => 'v1.5.1' do
19       file 'leaflet.contextmenu.js', 'dist/leaflet.contextmenu.js'
20       file 'leaflet.contextmenu.css', 'dist/leaflet.contextmenu.css'
21     end
22
23     from 'git://github.com/kajic/leaflet-locationfilter.git' do
24       file 'leaflet.locationfilter.css', 'src/locationfilter.css'
25       file 'leaflet.locationfilter.js', 'src/locationfilter.js'
26       folder 'img', 'src/img'
27     end
28
29     from 'git://github.com/domoritz/leaflet-locatecontrol.git', :tag => 'v0.71.0' do
30       file 'leaflet.locate.js', 'src/L.Control.Locate.js'
31     end
32
33     from 'git://github.com/jfirebaugh/leaflet-osm.git' do
34       file 'leaflet.osm.js', 'leaflet-osm.js'
35     end
36
37     from 'git://github.com/jieter/Leaflet.encoded.git', :tag => '0.0.9' do
38       file 'leaflet.polyline.js', 'Polyline.encoded.js'
39     end
40   end
41
42   folder 'ohauth' do
43     from 'git://github.com/osmlab/ohauth.git' do
44       file 'ohauth.js'
45     end
46   end
47
48   folder 'iD' do
49     from 'git://github.com/openstreetmap/iD', :branch => 'release' do
50       folder 'iD/data', 'dist/data'
51       folder 'iD/img', 'dist/img'
52       folder 'iD/locales', 'dist/locales'
53       folder 'iD/mapillary-js', 'dist/mapillary-js'
54       folder 'iD/pannellum-streetside', 'dist/pannellum-streetside'
55
56       file 'iD.css.erb', 'dist/iD.css' do |path|
57         rewrite(path) do |content|
58           content.gsub(/url\('?(img\/[^')]+)'?\)/, 'url(<%= asset_path("iD/\1") %>)')
59         end
60       end
61
62       file 'iD.js', 'dist/iD.js'
63     end
64   end
65
66   folder 'polyfill' do
67     file 'es5.js', 'https://polyfill.io/v3/polyfill.js?features=es5&flags=gated,always'
68     file 'es6.js', 'https://polyfill.io/v3/polyfill.js?features=es6&flags=gated,always'
69   end
70
71   folder 'javascripts' do
72     file 'html5shiv.js', 'https://raw.githubusercontent.com/aFarkas/html5shiv/master/src/html5shiv.js'
73   end
74
75   folder 'swfobject' do
76     from 'git://github.com/swfobject/swfobject.git', :tag => '2.2' do
77       file 'expressInstall.swf', 'swfobject/expressInstall.swf'
78       file 'swfobject.js', 'swfobject/src/swfobject.js'
79     end
80   end
81 end