peterb

Symfony asset version handling for Assetic

Mar 8th, 2011
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. Translated to the symfony use-case:
  2.  
  3. Bundle X could specify jQuery 1 (i.e. load the latest version)
  4. Bundle Y could specify jQuery 1.5
  5. Bundle Z could specify jQuery 1.4
  6.  
  7. X and Y could be enabled
  8. X and Z potentially could (a request for the latest version doesn't mean an old one won't work)
  9. Y and Z cannot be enabled at the same time
  10.  
  11. If someone tried to enable bundles Y and Z, Assetic could display a warning.
  12.  
  13. Q: Should bundles be this autonomous, or should users have to include the JS/CSS assets themselves?
  14.  
  15. ===================================================
  16. From the Google documentation about their approach (http://code.google.com/apis/libraries/devguide.html):
  17.  
  18.  
  19. google.load gives you two ways to specify which version of the library you wish to load. You can request:
  20. A specific version (such as google.load("jqueryui", "1.8.2");, which loads that exact version of the library (in this case, version 1.8.2).
  21. A truncated version (such as google.load("jqueryui", "1");, which loads the most recent version in that branch (in this case, 1.8.2).
  22.  
  23. ===============================================================
Advertisement
Add Comment
Please, Sign In to add comment