drab
drab copied to clipboard
Extract non-default modules to external libraries
- Drab.Query
- Drab.Modal
Plus: write a guide on how to extend Drab.
This must be done before 1.0, as it is a significant API change.
Rename DrabModule behaviour to Drab.Plugin
Extract all modules, including Drab.Live and Drab.Element, to the external libraries, but add them in the dependency, and as a default plugins.
New API:
- To include the plugin, add it to mix deps and to config as something like
config :drab, plugins: [Drab.Query, Drab.Live] ## Drab.Live and Drab.Element by default
- Plugins from config will be default to commander, when
use Drab.Commander. You may still override it withuse Drab.Commander, modules: [...]for the specific Commander
Note: why? It is because most of the Drab.Plugin modules (formerly DrabModule) are injecting some JS. This is for keeping page as small as it is possible
Moved this to the future 2.0.0, as it is not so urgent.