Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
7.3
-
None
-
Unknown
-
Description
In XWiki, we can use:
- $xwiki.ssx.use to enable stylesheets skin extensions ;
- $xwiki.jsx.use to enable javascript skin extensions ;
- $xwiki.ssfx.use to enable stylesheets skin extensions coming from the {/resources} folder ;
- $xwiki.jsfx.use to enable javascript skin extensions coming from the {/resources} folder.
But we have nothing for scripts and stylesheets coming from webjars. That's a shame.
Of course we can still use requirejs to load javascript afterwards, and @import url("$services.webjars.url('example', 'example.css')"); for CSS but it's less efficient (at least for CSS):
http://www.stevesouders.com/blog/2009/04/09/dont-use-import/
The best would be to have
- $xwiki.jswx.use() for javascript skin extensions coming from a webjar
- and $xwiki.sswx.use() for stylesheet skin extensions coming from a webjar.