question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pass in glob pattern, but only get report for 1 file

See original GitHub issue

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)

err2

err3

  • contents of src/ err1

What is the expected behavior?

I was expecting 10 outputs, 1 for each file in the src directory

Please 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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
siddharthkpcommented, Jun 14, 2018

I thought the glob pattern was going to sum the size of the matched files to see if it exceeded the given size.

Nope, sum of files is not a useful metric.

Here’s the explanation: https://github.com/siddharthkp/bundlesize/issues/205#issuecomment-373604616

1reaction
siddharthkpcommented, Oct 12, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python: glob only returns one result on path pattern
In the first case, the shell expands the wildcard and passes all 4 files to your code. In other words, length of sys.argv...
Read more >
glob — Unix style pathname pattern expansion ... - Python Docs
The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are...
Read more >
Understanding the glob pattern in Node.js - LogRocket Blog
The glob pattern is most commonly used to specify filenames, called wildcard characters, and strings, called wildcard matching. The glob pattern ...
Read more >
4. Glob Patterns And Other Basics - Exploring Expect [Book]
What actually happens is possibility (1). The first * matches philosop . As before, each * tries to match the longest string possible...
Read more >
Python Tutorial - File and Text Processing
1. File Input/Output. File Input/Ouput (IO) requires 3 steps: Open the file for read or write or both.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found