tachyons-skylark/lib/font-family.js

23 lines
764 B
JavaScript

var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-font-family/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-font-family/tachyons-font-family.min.css', 'utf8')
var moduleObj = cssstats(moduleCss)
var moduleSize = filesize(moduleObj.gzipSize)
var srcCSS = fs.readFileSync('./src/_font-family.css', 'utf8')
var template = fs.readFileSync('./templates/docs/font-family/index.html', 'utf8')
var tpl = _.template(template)
var html = tpl({
moduleVersion: module.version,
moduleSize: moduleSize,
moduleObj: moduleObj,
srcCSS: srcCSS
})
fs.writeFileSync('./docs/typography/font-family/index.html', html)