-
Notifications
You must be signed in to change notification settings - Fork 1
Description
As was already mentioned initially (and then in #10 and in various topics here and there), @plugin feature needs further improvements as its current implementation was just a temporary solution to get something in the release ASAP.
So the very first step for the unification would be to allow the @plugin directive to load both formats, i.e.:
@plugin "clean-css";- first try to load the "standard" format, i.e.
less-plugin-clean-css(in the directories specified in the docs) - and only then try to load
clean-css.jsfile (of the "easy-functions" format, in the directories of the compiled less project).
Contrary:
@plugin "clean-css.js";looks directly for an "easy-functions" clean-css.js file.
As also mentioned earlier, loading "standard format" plugins with @plugin directive is expected to have certain acceptable limitations/restrictions to work properly (e.g. no special scoping and the directive should appear before any code it may have an effect on (specifically for "visitor" plugins)).
Setting "standard format" options via @plugin are yet to be specified later. Obviously the options will be set via typical @import/@media-like syntax, e.g.:
@plugin (s1, advanced, compatibility: ie8) "clean-css";But exact implementation details to be set up later.