Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

jenssimon/tabular-filesize-gzip

Repository files navigation

NPM version Downloads star this repo fork this repo CI

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 © 2023 Jens Simon