-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support '*' wildcard for @import #1447
Comments
duplicate of #1181 |
P.s a pr would be great.. we welcome contributions.. please add a comment |
I just now noticed that you' offered to do a PR. That would be great, what lib(s) are you thinking of using? How would you do this to account for node.js vs browser etc.? |
I'm not sure how I would implement the feature in the browser. Do you have any thoughts @jonschlinkert? |
No thoughts on it lol, I was hoping you did. The general consensus has been that only node.js should be supported, but who knows I thought maybe you had some ideas for how it would work in the browser and I didn't want to discourage it prematurely. What about dependencies? Minimatch? @cowboy, I noticed you created https://github.com/gruntjs/grunt-glob and https://github.com/gruntjs/grunt-file, any chance those are happening in the short-term(er), or are those still in the "maybe" stage? IMO having those available as utility libs could be useful for this kind of feature. |
@jonschlinkert grunt-glob will eventually be the new name of globule, which you can use right now. grunt-file is going to take a little longer, because I need to figure out how I'm going to handle logging first. |
@cowboy, thanks so @luk3thomas I'll just wait and see what you come up with and we can go from there. thanks! |
Ok thanks, @jonschlinkert. I'll take a look and post some thoughts later |
👍 |
I have an idea how to support a number of "node" features like this one with some rewriting to browser mode. |
start thinking out loud on here then lol. let's get these ideas flowing so people can build on them! |
there should be a well defined interface to the environment.. 1.5.0-wip is closer to that though not there yet. We should add a function on the environment importer that asks the importer if the url might be for multiple imports, then another function with callback that returns those imports. Then we add a little bit of extra code to the import visitor that calls these functions in order to get a list of imports and expands the one import into multiple before continuing with the standard import process. |
It would be nice if less.js supported wildcards for the
@import
function. For example:Directory structure:
Then in
main.less
I can import all the files insidesome/dir
:If this feature is relevant and worth considering I'm happy to submit a PR. Let me know what you think. Thanks!
The text was updated successfully, but these errors were encountered: