Skip to content

Commit

Permalink
feat: size script (#202)
Browse files Browse the repository at this point in the history
## 馃摐 Description

Added `size.js` script which creates a package and prints zipped size.

## 馃挕 Motivation and Context

This is related to this
#201
PR. The reason why it handled in separate PR is because script in
#201
switches to target branch (`main`), but since the script is not
available in this branch - I can not verify that script works as
expected.

## 馃摙 Changelog

### CI
- added `scripts/size.js` file;

## 馃 How Has This Been Tested?

Was tested in
#201

## 馃摑 Checklist

- [x] CI successfully passed
  • Loading branch information
kirillzyusko committed Aug 10, 2023
1 parent d3c6c05 commit 37e9d39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/size.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { exec } = require('child_process');

exec('npm pack --json', function (error, stdout, stderr) {
console.log(JSON.parse(stdout)[0].size);
});

0 comments on commit 37e9d39

Please sign in to comment.