tabular-filesize-gzip

Show file sizes tabular including Gzip sizes

Usage no npm install needed!

<script type="module">
  import tabularFilesizeGzip from 'https://cdn.skypack.dev/tabular-filesize-gzip';
</script>

README

NPM version Downloads Dependencies star this repo fork this repo Build Status Code Style

tabular-filesize-gzip

Show file sizes tabular including Gzip sizes.

Screenshot

Install

$ yarn add tabular-filesize-gzip --dev

Usage

This generates a file size table with multiple sections and groups.

const tabularFilesizeGzip = require('tabular-filesize-gzip');

console.log(tabularFilesizeGzip([
  {
    title: 'Section 1',
    groups: [
      {
        title: 'JS files',
        files: 'test/js/**/*.js',
        ignore: [
          'test/js/legacy/**',
        ],
      },
      {
        title: 'CSS files',
        files: 'test/css/**/*.css',
      },
    ],
  },
  {
    title: 'Section 2',
    groups: [
      // ...
    ]
  }
]);

License

MIT © 2021 Jens Simon