Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Globbing for Files Not Working #30

Closed
jcmcallister opened this issue Aug 1, 2016 · 2 comments
Closed

Globbing for Files Not Working #30

jcmcallister opened this issue Aug 1, 2016 · 2 comments
Labels

Comments

@jcmcallister
Copy link

jcmcallister commented Aug 1, 2016

I'm not sure if I'm an idiot or if this is an actual problem.

In my Grunt workflow, after my dist folder is created, files are built and then copied into it, and my index.html file is created, I run the realFavicons:favicons task/target, with the following Grunt task config:

module.exports = {
    favicons: {
        src: 'src/images/favicon-base.png',
        dest: 'dist/img/icons',
        options: {
            iconsPath: 'img/icons',
            html: ['dist/*.html'],
            design: { ...

If i use an explicit filename like "dist/index.html", it works and injects just fine, easy-peasy.

If I use the quasi-glob formula as shown above, the globbing does NOT work, and creates the file "*.html" with only the injected HTML code inside of it. This was an example on the "favicon result" page of realfavicongenerator.com .

For posterity, my global settings are in the attachment Gruntfile.txt which is loading all of my grunt tasks. I am not the original author, and I'm not sure if the Gruntfile is disabling globbing (though I'm leaning towards a no).

Gruntfile.txt

Edited for formatting.

phbernard added a commit that referenced this issue Aug 8, 2016
@phbernard
Copy link
Contributor

Thank you for reporting!

I'm the idiot here. I've just release v0.1.7, which should fix the issue. Please let me know if that solves the problem on your side.

@phbernard phbernard added the bug label Aug 8, 2016
@jcmcallister
Copy link
Author

I think you've got it!

The initial code example from the Issue works as expected with html: ['dist/*.html'],.

Please Note: I have not done any more extensive testing due to other pressing work. Other such test cases should include **/*.php or other potential globbing patterns for common use cases.

Cheers, Philippe.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants