var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')

var module = require('tachyons-borders/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-borders/tachyons-borders.min.css', 'utf8')
var moduleObj = cssstats(moduleCss)
var moduleSize = filesize(moduleObj.gzipSize)

var srcCSS = fs.readFileSync('./src/_borders.css', 'utf8')

var template = fs.readFileSync('./templates/docs/borders/index.html', 'utf8')
var tpl = _.template(template)
var html = tpl({
  moduleVersion: module.version,
  moduleSize: moduleSize,
  moduleObj: moduleObj,
  srcCSS: srcCSS
})

fs.writeFileSync('./docs/themes/borders/index.html', html)

@@ -439,16 +439,84 @@
 'utf8')%0A
+var navDocs = fs.readFileSync('./templates/nav_docs.html', 'utf8')%0A%0A
 %0Avar tem
@@ -733,16 +733,36 @@
 : srcCSS
+,%0A  navDocs: navDocs
 %0A%7D)%0A%0Afs.

Update with reference to global nav partial