Skip to content

Commit

Permalink
feat: add bundle size of react package
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdchan committed Nov 24, 2023
1 parent 3473788 commit 7908281
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ The developers only need to develop their blocks with their favourite UI framewo
- Core(![npm](https://img.shields.io/npm/v/blocky-core)): The core of the editor. Written in vanilla JS. It can be used standalone without any
UI frameworks.
- Gzipped size: ~40kb
- React(![npm](https://img.shields.io/npm/v/blocky-react)): Wrap the editor in [React](https://react.dev/). Provide the UI facilities such as
toolbar and banner.
- React bindings(![npm](https://img.shields.io/npm/v/blocky-react)): Wrap the editor in [React](https://react.dev/). Provide the UI facilities such as
toolbar and spanner.
- Gzipped size(including Core): ~80kb
- [Example](https://blocky-editor.dev/): The example to demonstrate how to use the editor.

## Resources
Expand Down
5 changes: 5 additions & 0 deletions bundle_size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
gzip core_bundle.js
du -sh core_bundle.js.gz
rm -f core_bundle.js.gz

./node_modules/.bin/esbuild --bundle --minify packages/blocky-react/dist/index.js > react_bundle.js
gzip react_bundle.js
du -sh react_bundle.js.gz
rm -f react_bundle.js.gz
7 changes: 6 additions & 1 deletion packages/blocky-example/app/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ export const ReadMeContent = `
<li>Gzipped size: ~40kb</li>
</ul>
</li>
<li>React: Wrap the editor in <a href="https://react.dev/">React</a>. Provide the UI facilities such as toolbar and spanner.</li>
<li>
React bindings: Wrap the editor in <a href="https://react.dev/">React</a>. Provide the UI facilities such as toolbar and spanner.
<ul>
<li>Gzipped size(including Core): ~80kb</li>
</ul>
</li>
<li>
Example(this page): The example to demonstrate how to use the editor.
</li>
Expand Down

1 comment on commit 7908281

@vercel
Copy link

@vercel vercel bot commented on 7908281 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.