andresz1 / size-limit-action

Compare the real cost to run your JS app or lib to keep good performance in every pull request
ISC License
451 stars 84 forks source link

feat: custom script #79

Closed amilajack closed 2 years ago

amilajack commented 2 years ago

This PR adds the ability to customize the script, which defaults to npx size-limit --json.


When used with npm workspaces, npx executes in all workspaces. Therefore, stdout of npx size-limit --json in workspaces breaks parsing since it looks like this:

[
  {...},
  {...}
]
[
  {...},
  {...}
]

A way around that is to specify the workspace:

npm exec size-limit --workspace my-workspace -- --json

This currently isn't possible, since the default script of npx size-limit --json isn't customizable.

andresz1 commented 2 years ago

LGTM 👍🏻 thanks

mydea commented 2 years ago

Any chance to cut a new release including this change? :)