Preprocessor to compile Jade templates on the fly.
The easiest way is to keep karma-jade-preprocessor
as a devDependency in your package.json
.
{
"devDependencies": {
"karma": "~0.10",
"karma-jade-preprocessor": "~0.1"
}
}
You can simple do it by:
npm install karma-jade-preprocessor --save-dev
Following code shows the default configuration...
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.jade': ['jade']
}
});
};
The jade preprocessor can be used in conjunction with others (eg. karma-ng-html2js-preprocessor). Simply include it in an array that specifies the chain of processors.
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.jade': ['jade', 'ng-html2js']
}
});
};
For more information on Karma see the homepage.