microsoft / monosize

Bundle size tooling for monorepos
MIT License
25 stars 9 forks source link

`monosize measure` an option for artifacts location `--artifacts-location` #66

Closed sarmad-abualkaz closed 4 months ago

sarmad-abualkaz commented 4 months ago

This PR is to allow for the use case described in this issue #63

Adds the option --artifactsLocation to the measure subcommand to ensure we can have the monosize.json output to a specified directory (leaving the default to current behaviour - dist/bundle-size).

Note: since the command also does remove on all content await fs.promises.rm(artifactsDir, { recursive: true, force: true }); I've made this option to return an error if the option recieves current working directory (i.e. --artifactsLocation=".") as this can have some bad results by deleting all content in the package.

sarmad-abualkaz commented 4 months ago

@sarmad-abualkaz please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"