Add gzipped package size to website (Fix #992)

This commit is contained in:
Niklas von Hertzen
2017-12-11 21:20:14 +08:00
parent 50608e9cd4
commit 2d132b85c6
4 changed files with 151 additions and 127 deletions

View File

@@ -1,6 +1,13 @@
const gzipSize = require('gzip-size');
const path = require('path');
const fs = require('fs');
module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`
title: `html2canvas`,
packageSize: gzipSize.sync(
fs.readFileSync(path.resolve(__dirname, '../dist/html2canvas.min.js'))
)
},
plugins: [
{