knots
v1.0.0
Published
Tie CommonJS modules to certain pages and components
Downloads
4
Readme
Knots
Example
const Knots = require('knots');
const knots = new Knots();
knots.tie('base', () => [require('./partials/header.js'), require('./partials/footer.js']);
knots.tie('page:contact', () => [require('./pages/contact.js')]);
knots.run(['base']);
header.js
module.exports = function HeaderPartial() {
// stuff
return () => {
// onload
}
}