@sebastián-cisneros In static:api.routes, you'll want to call controllerHelpers.setupAPIRoute to mount the route to the appropriate /api/v3/plugins mount point.
You can see an example of how we do it in the quickstart plugin
Hi guys, what will you recommend for the plugin, that should be implemented with a widget, but should use client JS that is hosted on CDN?
Asynchronous loading of the js file (script injection)?
@julian yes. For example Google with their Chromecast, asks for using link from CDN, etc.
Yeah, I'd probably have the widget load js if the library it wants to use isn't found...
var scriptEl = document.createElement('script');
scriptEl.src = 'http://...';
scriptEl.type = 'text/javascript';
// then do some magic to append it to <head>
@julian What do you think about an idea to extend .json
configuration for plugins, to have something related to external scripts (scripts.external = []
)?
Also will minifier use external js? So every reboot of forum will give latest version to the user.