ChicagoFLF font as a node packaged module.
# npm package
$ npm install chicago.css
The css is exported from the package.json main field and can be imported using a css bundler or copied out of node_modules
as part of a larger build process.
@import 'chicago.css';
body { font-family: ChigacoFLF, sans-serif; }
You can use PostCSS to inline and import this css module using the following postcss.config.js
:
module.exports = (ctx) => ({
plugins: {
'postcss-import': { root: ctx.file.dirname }, // Inline module css
'postcss-url': { // Copy assets from node_modules
url: 'copy',
useHash: true,
assetsPath: 'assets'
}
}
})
$ postcss styles.css -o dist/bundle.css