TrevorBurnham/snockets — Issue #10: client-side jade support (patch)
Author: enki
Created: 2012-01-21 10:52:05+00:00
State: open

i'm monkey patching snockets to provide support for requiring client-side jade templates (to be used with jade.js):

snockets = require('connect-assets/node_modules/snockets/lib/snockets')
snockets.compilers.jade =
match: /\.js$/
compileSync: (sourcePath, source) ->
"jade_" + path.basename(sourcePath, '.jade') + " = jade.compile(" + JSON.stringify(source) + ", {filename: " + JSON.stringify(sourcePath) + "});"

maybe you just want to support a few template engines like that out of the box, or at the very least support for .txt, so that you can just compile them yourself without having to write inline template code

non-sequitur:
also i found it annoying that package.json refers to main as "main": "lib/snockets.js" - that meant i had to cake after every modification. not much point to it when depending on coffee-script anyway