-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
pass in glob pattern, but only get report for 1 file #157
Comments
@lmj0011 Nice catch! Turns out you can't get multiple files with commander (or maybe we're using it wrong) Ref: https://github.com/siddharthkp/bundlesize/blob/master/src/config.js#L14-L28 Thanks for taking the time to report the issue, we'll fix it! |
@lmj0011 Would you like to work on this? CONTRIBUTING.md is a good place to start. And of course, we are here to discuss the details + implementation and help you along the way! |
sure, I can take a look at it when I have time |
I think this might be a bash problem. I don't know certain but maybe bash has a glob like system built in? Would it be an option to discard the
|
On a side note, I expected that a glob like pattern would sum up the file sizes. |
hmm, I think we'll have to replace this with a more explicit file read. side note: I'm not sure if sum of sizes is a useful metric, because bundles are usually loaded in parallel, you should optimise for the slowest request |
@tdeschryver is right, BASH is parsing the glob before it gets handled by the node script. My suggestion would be to make a note of quoting the glob path on the cli see: https://medium.com/@jakubsynowiec/you-should-always-quote-your-globs-in-npm-scripts-621887a2a784 |
@lmj0011 updated the readme for "quotes" |
@siddharthkp I agree with @tdeschryver... Is this feature implemented already or is there a feature request for this already? |
Nope, sum of files is not a useful metric. Here's the explanation: #205 (comment) |
Do you want to request a feature or report a bug?
report a bug
What is the current behavior?
glob patterns seem to not work with the bundlesize cli tool
If the current behavior is a bug, please provide the steps to reproduce.
pass in a glob pattern into the bundlesize command. (see screenshots for steps)
src/
What is the expected behavior?
I was expecting 10 outputs, 1 for each file in the
src
directoryPlease mention other relevant information.
node version
7.10.0
npm version
4.2.0
Operating system
Ubuntu 16.04.3 LTS (xenial)
bundlesize version
0.15.2
CI you are using
none
The text was updated successfully, but these errors were encountered: