node.js - Connect assets with handlebars? -
the typical way include connect assets file
!= css("main")
that .jade though. using handlebars , have no clue how can add file?
i using node-sass
well.
just guessing, works (see blog post):
var connectassets = require("connect-assets")(); app.use(connectassets); var hbs = require('hbs'); hbs.registerhelper('css', function() { var css = connectassets.options.helpercontext.css.apply(this, arguments); return new hbs.safestring(css); });
Comments
Post a Comment