
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
karma-pug-preprocessor
Advanced tools
Preprocessor to compile Pug templates on the fly.
The easiest way is to keep karma-pug-preprocessor as a devDependency in your package.json.
{
"devDependencies": {
"karma": "1.7.0",
"karma-pug-preprocessor": "1.0.0-beta.2"
}
}
You can simple do it by:
npm install karma-pug-preprocessor --save-dev
Following code shows the default configuration...
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.pug': ['pug']
}
});
};
As with other preprocessors, One can further configure the options passed to Pug either by adding an extra property to your karma.conf.js:
pugPreprocessor: {
options: {
pretty: false
}
}
Or by abstracting this into a custom preprocessor:
customPreprocessors: {
myPug: {
base: 'pug',
options: {pretty: false}
}
}
The pug 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: {
'**/*.pug': ['pug', 'ng-html2js']
}
});
};
For more information on Karma see the homepage.
FAQs
A Karma plugin. Compile pug templates on the fly.
The npm package karma-pug-preprocessor receives a total of 56 weekly downloads. As such, karma-pug-preprocessor popularity was classified as not popular.
We found that karma-pug-preprocessor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.