You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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¢.
@matthew-dean
I have a proof of concept of the @import (plugin) "../plugins/my-plugin.js"; syntax working on the NodeJS side of things.
Fasted way to hammer it out was to place a hard require() call inside the ImportManager class, which works well enough. Ofcourse I really should set this up to work in an environment agnostic way. I have some ideas regarding how to set this up, but will have to see if they pan out.
Would you be interested in the work I've done sofar?
Should not we close this since #2479? (There're some additional stuff to be implemented further like passing options to plugin and cli/@plugin interfaces unification, but I guess these are to be further feature-requests/issues to be ticked...)
Activity
rjgotten commentedon Feb 25, 2015
@matthew-dean
I have a proof of concept of the
@import (plugin) "../plugins/my-plugin.js";syntax working on the NodeJS side of things.Fasted way to hammer it out was to place a hard
require()call inside theImportManagerclass, which works well enough. Ofcourse I really should set this up to work in an environment agnostic way. I have some ideas regarding how to set this up, but will have to see if they pan out.Would you be interested in the work I've done sofar?
seven-phases-max commentedon Mar 30, 2015
Should not we close this since #2479? (There're some additional stuff to be implemented further like passing options to plugin and
cli/@plugininterfaces unification, but I guess these are to be further feature-requests/issues to be ticked...)rjgotten commentedon Mar 30, 2015
I still have the #2522 pull request open. It fixes several scoping issues and provides more complete coverage in the unit test suite.
lukeapage commentedon Mar 30, 2015
matthew-dean commentedon Oct 1, 2015
Closing as #2479 and #2522 have been merged.