stats.ejs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <%- partial('partials/sidebar', { type: page.type, index: page.index }) %>
  2. <div class="Content js-Content <%- page.type ? page.type + ' with-sidebar' : '' %>">
  3. <h1><%- page.title %></h1>
  4. <p class="Stats-infoText">
  5. To keep Uppy lightweight, we’re aiming to carefully select what packages we include.
  6. The graph below will help us discover low hanging fruit. Sizes and dependencies shown here
  7. are for the bundled version of Uppy, which includes all plugins we offer. In production,
  8. when you <a href="https://github.com/transloadit/uppy#usage">pick and choose just the ones you need</a>, the size will be much smaller:
  9. <ul>
  10. <li>Drag & Drop + Multipart uploads ≈ <code>18 Kb mingz</code></li>
  11. <li>Full-featured Dashboard with image previews and progress indicators + tus resumable uploads ≈ <code>36 Kb mingz</code></li>
  12. </ul>
  13. </p>
  14. <iframe scrolling="no" seamless="seamless" class="Disc" src="/disc.html"></iframe>
  15. This graph is built with
  16. <a href="https://twitter.com/hughskennedy">Hugh Kennedy</a>’s excellent
  17. <a href="http://hughsk.io/disc/">disc</a>.
  18. <hr />
  19. <h2>Bundle Sizes</h2>
  20. <table width="100%">
  21. <thead>
  22. <tr>
  23. <th align="left">Package</th>
  24. <th align="left">Minified</th>
  25. <th align="left">Gzip</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <% for (const [name, sizes] of Object.entries(theme.uppy_bundle_kb_sizes)) { %>
  30. <% const { minified, gzipped, prettyMinified, prettyGzipped } = sizes %>
  31. <tr>
  32. <td><%- name %></td>
  33. <td class="
  34. <% if (minified > 50 * 1000) { %>red<% } %>
  35. <% if (minified < 20 * 1000) { %>green<% } %>
  36. ">
  37. <%- prettyMinified %>
  38. </td>
  39. <td class="
  40. <% if (gzipped > 30 * 1000) { %>red<% } %>
  41. <% if (gzipped < 10 * 1000) { %>green<% } %>
  42. ">
  43. <%- prettyGzipped %>
  44. </td>
  45. </tr>
  46. <% } %>
  47. </tbody>
  48. </table>
  49. <h2>Browser support</h2>
  50. <p>This reflects the current state of Uppy and is updated with every change.</p>
  51. <a href="https://saucelabs.com/u/transloadit-uppy">
  52. <img src="https://saucelabs.com/browser-matrix/transloadit-uppy.svg" alt="Sauce Test Status" width="100%">
  53. </a>
  54. <div class="footer">Caught a mistake or want to contribute to the documentation?
  55. <a href="https://github.com/transloadit/uppy/blob/master/website/src/<%- page.source %>" rel="noreferrer noopener" target="_blank">
  56. Edit/fork this page directly on Github
  57. </a>!
  58. </div>
  59. </div>