-
Notifications
You must be signed in to change notification settings - Fork 14
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 certain files to be "last" #5
Comments
Hey @mariusmarais, we would have to distinguish between "exact" and "glob" matches and I don't have the time for that at the moment. Pull requests are very welcome. But maybe all you need is this (should work already, since
|
+1 or just put the above minmatch work around on the docs page. |
I've actually resorted to using
By prefixing debug files with 'zz_' you intuitively understand that these files should be last, even though it's not that pretty. I then pipe most of my var sort = lazypipe().pipe(plugins.order, ['**/*']); The most important thing is that it's consistent, and for my purpose alphabetical is good enough; if you want, you can still add FWIW, I'm fine with closing this wontfix. |
+1 |
I only have one file that I want at the end, so I'm not sure that this would work in all cases, but this works for me (init.js is at the end)
|
I would really like this feature as well. Ideally, I'd like having entries that are either a glob string or a glob string and a priority. Instead of exiting as soon as a matcher is found, check files against all matchers and pick the one with the highest priority -- allowing you to specify something like this:
|
As an alternate approach, instead of specifying manual priorities, you could match every file against every matcher, counting how many total hits were encountered for each matcher. Then, for each file with multiple matches, select the matcher with the lowest number of total hits. This would give the "right answer" in every use case I can think of (although I'm probably missing some). For example:
In English: "orders files using a series of glob patterns. When a file matches more than one pattern, the most specific glob pattern is used to determine the order." |
I'm trying to express the following order, but it's not working as I had hoped:
I want
debug.js
to always be at the end, but since it matches the**/*.js
, it get placed too early. How can I express that a certain file (certain files) should come later?The text was updated successfully, but these errors were encountered: