Support file globbing for @imports
See original GitHub issueSee: https://github.com/isaacs/node-glob, and ~~https://github.com/isaacs/minimatch~~ https://github.com/jonschlinkert/micromatch
I use these often in projects. It would be pretty awesome to be able to do the following and not have to specify individual files:
@import "mixins/*.less";
@import "components/**/*.less";
After only a few minutes of using these patterns they become second nature. It might even help with some of the other import issues.
Implemented via plugin: less-plugin-glob.
Issue Analytics
- State:
- Created 11 years ago
- Comments:70 (24 by maintainers)
Top Results From Across the Web
glob — Unix style pathname pattern expansion ... - Python Docs
This function can support paths relative to directory descriptors with the dir_fd parameter. If recursive is true, the pattern “ ** ” will...
Read more >glob – Filename pattern matching - Python Module of the Week
import glob for name in glob.glob('dir/*'): print name. The pattern matches every pathname (file or directory) in the directory dir, without recursing ...
Read more >Python Glob: Filename Pattern Matching - PYnative
Python glob module to find files and folders whose names follow a specific pattern. Search files recursively with wildcard characters.
Read more >Does Snowpack support importing files using a glob pattern?
Currently Snowpack doesn't support importing multiple files matching a glob pattern, but there is an open issue to implement this feature, ...
Read more >How to use Glob() function to find files recursively in Python?
In Python, the glob module is used to retrieve files/pathnames matching a specified pattern. The pattern rules of glob follow standard Unix path ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Because I can’t wait resolution of this issue anymore, I write plugin which does it, and use it for my projects. https://github.com/just-boris/less-plugin-glob Less allow to create custom file loaders for
@imports
. I’ve create this one which resolves imports with globs in import path. Any feedback will be appreciated.For globbing in less you can simple simple run this in your project,
npm install less-plugin-glob --save-dev
then add this to your Gruntfile in the options group of your less task
plugins: [require('less-plugin-glob')]
The result is something like this:
Now in your .less file you can write this: