1.1.2 • Published 5 years ago
buzios v1.1.2
Buzios
Introduction
This all raises the question: how exactly do we include versioned assets into HTML, if the names keep changing? That can be tricky. Buzios helps you appropriately link versioned assets by creating a helper function to use within your views. This is done by reading a manifest file which contains a map to the final versioned asset filename.
Quick start
Installation
$ npm install buzios
const Koa = require('koa')
const path = require('path')
const buzios = require('buzios')
const app = new Koa()
app.use(buzios(path.join(__dirname, 'dist/manifest.json')))
// ...
<link rel="stylesheet" href="{{ buzios('/css/app.css') }}">
<script src="{{ buzios('/js/app.js') }}"></script>