typography: generator

This commit is contained in:
He4eT 2020-10-30 00:33:07 +05:00
commit 04a3fa2f7b
2 changed files with 17 additions and 1 deletions

View file

@ -5,7 +5,8 @@
"main": "site.config.js", "main": "site.config.js",
"scripts": { "scripts": {
"start": "nanogen start", "start": "nanogen start",
"build": "nanogen build" "build": "nanogen build",
"typography": "node typography.js"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",

15
typography.js Executable file
View file

@ -0,0 +1,15 @@
const Typography = require('typography')
const fs = require('fs')
const TYPOGRAPHY_CSS_FILEPATH =
'./src/assets/css/typography.css'
const typography = new Typography({
})
void fs.writeFile(
TYPOGRAPHY_CSS_FILEPATH,
typography.toString(),
err => err
? console.error(err)
: console.log(`Updated: ${TYPOGRAPHY_CSS_FILEPATH}`))