0.1.0 • Published 5 years ago

sizemometer-report v0.1.0

Weekly downloads
270
License
-
Repository
github
Last release
5 years ago

Sizemometer

npm version Build Status

Monitoring for your front end assets. Gives you nice graphs to track the size of your files over time.

Setting up

Install the package:

npm install -S sizemometer

Set up a config file at .sizemometer/config.js in the root of your project.

module.exports = {
  title: 'Your project name',
  trackedFiles: ['dist/bundle.js', 'main-*.js'],
  commitIgnorePattern: 'Update dependency',
  theme: {
    accentColor: '#BADA55'
  },
  repositoryUrl: 'https://github.com/chardos/sizemometer'
}
PropertyDescriptionTypes
titleDisplayed in app headerstring
trackedFilesFiles to take snapshots of. Supports globbing.array
commitIgnorePatternWhen this matches your latest commit message, no new snapshot will be takenstring, regex
theme.accentColorChanges the color of the barsstring

Using sizemometer

To take your first snapshot, run:

npx sizemometer add

Then to view the report:

npx sizemometer report

API

import { add } from 'sizemometer';

await add({currentHistory});