Skip to content
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

src does not support globs #42

Open
arlodesign opened this issue Sep 21, 2016 · 2 comments
Open

src does not support globs #42

arlodesign opened this issue Sep 21, 2016 · 2 comments

Comments

@arlodesign
Copy link

arlodesign commented Sep 21, 2016

My config:

bless: {
    prod: {
        options: {
            logCount: 'warn',
            failOnLimit: 'true'
        },
        src: ['dist/prod/www/css/**/*.css']
    }
}

The output of grunt bless:prod --verbose:

Running "bless:prod" (bless) task
[D] Task source: (MY PATH)/node_modules/grunt-bless/tasks/bless.js
Verifying property bless.prod exists in config...OK
Files: (BIG LIST OF FILES SUPPRESSED, BUT IT WAS A CORRECT LIST OF PATHS SEPARATED BY COMMAS)
Options: compress=false, logCount="warn", force=false, warnLimit=4013, imports, failOnLimit="true", suffix="", sourceMaps=false, root=""
it is not an array.
Reading dist/prod/www/css/bookmarklet/bookmarklet-all.82bc5f57.css...OK
Warning: Cannot read property '0' of undefined Use --force to continue.

Aborted due to warnings.

I would think that should work, but it's not reaching the concat function as an array. Could be a grunt issue? Could be me doing something wrong? But this seems like it should work.

@arlodesign
Copy link
Author

I'll add that I did see a test that uses a wildcard, so I'm not sure what's different on my end.

@arlodesign
Copy link
Author

arlodesign commented Sep 21, 2016

Now that I'm looking at this, it doesn't seem my use case works anyway. I'm looking to see if the files are individually exceeding the limit. This tool seems to concatenate all of the css before doing its work. I'm closing, as I think I'll need to write something a little more custom.

In any event, I logged this:

const getFiles = function() { const files = grunt.file.expand(dist/prod/www/css/**/*.css); grunt.fail.fatal(Array.isArray(files)); }

and it returned true, so I'm not sure why grunt is failing. I'll leave the issue open if you want to investigate it further.

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

No branches or pull requests

1 participant