A bare minimum implementation of SVG badge generation extracted from the source code of shields.
Only depends on doT.
The following badges were generated by shields-lightweight over its own code source using jshint-reporter-badge, mocha-reporter-badge and lcov2badge. If you want to know how, have a look at the gulpfile and travis configuration.
npm install shields-lightweight
var shields = require('shields-lightweight');
var svgBadge = shields.svg('subject', 'status', 'red', 'flat');