Allow overriding import rules (maybe through plugins) #1697

Closed
donaldpipowitch opened this Issue Dec 2, 2013 · 8 comments

Comments

Projects
None yet
4 participants
@donaldpipowitch

Rework has a nice plugin architecture which makes it possible to create plugins like Rework NPM. This plugin allows importing of CSS with Node-require-like logic (see here).

I want to do a similar thing with Bower packages for Less.

Example:
In Less I can import a .less file from a bower_component like this:

@import "../bower_components/mixins-lib/actual-less-file";

I can also add the path to ../bower_components in the build step so I can write this:

@import "mixins-lib/actual-less-file";

But what I really want is this:

@import "mixins-lib";

Hence the mixins-lib/ Bower package has declared the actual-less-file.less in bower.json's main property I can import actual-less-file via the Bower package name.

@lukeapage

This comment has been minimized.

Show comment
Hide comment
@lukeapage

lukeapage Dec 22, 2013

Member

I'd support making the import process more pluggable. Are you planning on submitting a patch?

Member

lukeapage commented Dec 22, 2013

I'd support making the import process more pluggable. Are you planning on submitting a patch?

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch Dec 23, 2013

I haven't planned to do that - probably I don't have enough time for this anytime soon :( -, but if I would start that I would ask if this should be a more generic question about adding plugins for less - not just for imports?

I haven't planned to do that - probably I don't have enough time for this anytime soon :( -, but if I would start that I would ask if this should be a more generic question about adding plugins for less - not just for imports?

@ghost ghost assigned cloudhead Dec 23, 2013

@lukeapage

This comment has been minimized.

Show comment
Hide comment
@lukeapage

lukeapage Dec 23, 2013

Member

I recently added plugins to less, but at the moment they are visitors running on the ast. I've yet to document them..

Member

lukeapage commented Dec 23, 2013

I recently added plugins to less, but at the moment they are visitors running on the ast. I've yet to document them..

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch Dec 23, 2013

Sounds great! If you finish the docs, please drop a link :)

Sounds great! If you finish the docs, please drop a link :)

@matthew-dean

This comment has been minimized.

Show comment
Hide comment
@matthew-dean

matthew-dean Dec 24, 2013

Member

I recently added plugins to less

Wait, what? Weren't plugins already possible (just not auto-loadable)?

Member

matthew-dean commented Dec 24, 2013

I recently added plugins to less

Wait, what? Weren't plugins already possible (just not auto-loadable)?

@matthew-dean

This comment has been minimized.

Show comment
Hide comment
@matthew-dean

matthew-dean Dec 24, 2013

Member

(suddenly very interested in said documentation)

Member

matthew-dean commented Dec 24, 2013

(suddenly very interested in said documentation)

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch Jan 27, 2014

Hi @lukeapage, can I find the docs about plugins somewhere on the new docs page? Or could you point me to the file changes including the plugin architecture? Thank you!

Hi @lukeapage, can I find the docs about plugins somewhere on the new docs page? Or could you point me to the file changes including the plugin architecture? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment