facebookarchive/draft-js

Documentation for `bundle-size-stats`

Open

#1,900 opened on 2018年10月14日

GitHub で見る
 (14 comments) (3 reactions) (0 assignees)JavaScript (22,554 stars) (2,646 forks)batch import
documentationgood first issuehelp wanted

説明

Do you want to request a feature or report a bug? This is a documentation request.

What is the current behavior?

  • When the build runs, the JSON files in draft-js/meta/bundle-size-stats/ are updated. They are not human readable and it confuses people, and we have not documented how to use them.

Goals:

  • MVP would be a couple of steps:
    • to somehow make it optional to update these files, so that they don't update every time the build runs. I had thought this would be handy to always have them updated, but since it is confusing people I think we could make it a separate step.
    • to add a file inside the draft-js/meta/bundle-size-stats/ that explains that you can drag the JSON file and drop it onto a page like this and see the current state of the bundle, giving the size of every module. We could briefly explain this in the README or CONTRIBUTING documents and link to the full guide.
  • Bonus ideas:
    • Set up a github bot to comment on pull requests and mention the size increase or decrease they would cause for the bundle.
    • Rig up a page in the Draft.js documentation to show the bundle analysis for the latest release.
    • Look at the data and find some easy ways to decrease the bundle size. It's too big right now.

For context see the two PRs which introduced the bundle-size-stats tracking: https://github.com/facebook/draft-js/pull/1644 and https://github.com/facebook/draft-js/pull/1654

Please comment on this issue if you are working on it, and I will check in here roughly weekly to review/answer questions. Thanks! ✨

Tagging @altano who added this cool feature and can maybe give context on this.

コントリビューターガイド