Minions! At my command!

This project is not covered by Drupal’s security advisory policy.

Minions! At my command!

Summoner is an API module enabling frontend developers to load Drupal libraries on demand. Think of it as some kind of poor mans require.js for Drupal.

Example:

Drupal.summon(['system/ui.button'], function() {
  $('button').button();
});

Explanation

Summoner relies on the AJAX-API to do the heavy lifting of dependency resolution and page state handling. Therefore it's not a replacement for the "deferred" option or placing scripts in a non-blocking way. It's intended to ease post-loading of heavy-weight ui libraries that won't be added to the page itself, but when the user really needs them. Like a complex editor or drag & drop interface.

Why not require.js (or similiar solutions)?

Most of the other asset loader libraries have problems with CSS files are not easily compatible with Drupal libraries. Summoner is an approach to use Drupal's existing asset loading mechanisms instead of replacing them. and therefore integrate transparently with library dependencies and aggregation.

Project information

Releases