Skip to content

Feature proposal: @import (plugin) "myplugin.js" (or @plugin "myplugin.js") #2416

@matthew-dean

Description

@matthew-dean

Surfacing this here as proposed by @rjgotten in #1861. "Plugins" were marked as implemented per that discussion, with anything not included in the plugin commit being deferred to a separate thread, so putting this proposal made during the discussion for housekeeping / any further discussion.

From @rjgotten:


Just to change things up; how about a declarative syntax to load "user mode" plugins from LESS style sheets themselves. Something like:

@import (plugin) "../plugins/my-plugin.js";

That would certainly open up possibilities for more heavy duty styling 'frameworks' without requiring customizing your installation with additional packages via npm, etc.

...The absolute easiest and most foolproof way to ensure a plugin is loaded is by picking it up as an import as part of the compilation process. Completely hands-off, no user-configuration required.

Other comments:

@calvinjuarez commented on Feb 26, 2014

As a non-lessc, pre-processor-style, CodeKit LESS user, I'm very in favor of a directive in the LESS file itself. I'd prefer to have a separate directive keyword (like, say @plugin), because I feel like the function of a plugin (augmenting how LESS works) is different to imports (affecting the output CSS). That's my 2¢.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions