Skip to content

Unification of plugin subsystems. #17

@seven-phases-max

Description

@seven-phases-max

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.js file (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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions