node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »


james-compile - A compiler plugin for james.js

Generic template compiler for James.js. The compiler you use should provide a compile method that returns a function that may be used to render a context. Ie. jade.compile()() is such a function. In case the templating engine you wish to use does not implement this scheme, consider implementing an adapter.

var james   = require('james'),
    compile = require('james-compile'),
    jade    = require('jade');
james.task('jade', function() {
    james.list('src/**/*.jade').forEach(function(file) {
                compiler: jade,
                filename: file,
                context: {
                    title: 'demo'


james-compile is available under MIT. See LICENSE for more details.