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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -