Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12788

Introduce skin extension plugins for webjar resources

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 7.3
    • Skin - Skinx
    • 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.

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            gdelhumeau Guillaume Delhumeau
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: