Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Rails Assets wroc_love.rb
Tymon Tobolski
March 16, 2014
Programming
1
550
Rails Assets wroc_love.rb
wroc_love.rb 2014 lighting talk - the state and future of rails-assets.org
Tymon Tobolski
March 16, 2014
Tweet
Share
More Decks by Tymon Tobolski
See All by Tymon Tobolski
teamon
1
240
teamon
2
540
teamon
2
380
teamon
1
73
teamon
1
64
teamon
1
190
teamon
2
270
teamon
0
6.8k
teamon
2
200
Other Decks in Programming
See All in Programming
syucream
4
1.4k
tarappo
4
390
tmyk110
1
120
thatjeffsmith
0
1.3k
kodetr
0
120
chimerast
0
330
takuyaa
4
470
seike460
7
2.2k
rockname
1
320
o0h
PRO
3
1.5k
fr0gger
2
2.8k
n1215
1
450
Featured
See All Featured
lauravandoore
440
28k
hatefulcrawdad
257
17k
eileencodes
114
25k
cromwellryan
104
6.3k
bryan
32
3.5k
erikaheidi
14
4.5k
thoeni
3
660
malarkey
119
16k
aarron
258
36k
schacon
147
6.7k
ddemaree
273
31k
marktimemedia
7
440
Transcript
Asset Management in Rails
State of the art • /vendor/assets • asset gems Ruby
World JavaScript World • /vendor/assets • bower
So what's the problem? • Asset Gems won't package themselves
• Asset Gems are always step behind official libraries • Unnecessary stuff like ruby helpers :-(
If only I could use bower components in ruby
+ rails-assets.org
source 'https://rubygems.org' +source 'https://rails-assets.org' ! gem 'rails' ! group :assets
do gem 'sass-rails' gem 'uglifier' gem 'coffee-rails' + gem 'rails-assets-bootstrap' + gem 'rails-assets-angular' + gem 'rails-assets-leaflet' end
application.js ! ! ! //= require_self +//= require bootstrap +//=
require angular +//= require leaflet //= require_tree . application.css ! ! /* *= require_self +*= require bootstrap +*= require leaflet *= require_tree . */
None
Is it any good? • No more vendor/assets :-) •
Proper versioning :-D • Dependency resolution x-D • Just works!
What's the catch? • Rails Assets is centralized solution •
Only tag releases are bundled to .gem files • Mixing assets definitions with gem definitions • Long gem names (rails-assets-jquery)
bower-rails source 'https://bower.io' ! asset "angular" asset "underscore", "~> 2.0"
! group :test, :development do asset "karma" end
application.js ! ! ! //= require_self +//= require bootstrap +//=
require angular +//= require leaflet //= require_tree . application.css ! ! /* *= require_self +*= require bootstrap +*= require leaflet *= require_tree . */
We're joining forces! rails-assets + bower-rails = <3
Please help us! Tymon Tobolski ! i@teamon.eu @iteamon Adam Stankiewicz
! sheerun@sher.pl @sheerun GitHub: rails-assets/rails-assets