JavaScript and CSS Sugar

npm install servitude
10 downloads in the last month


Build Status

Super fast sugar for optimizing CSS and JavaScript.

Servitude combines CSS and JavaScript into a single fast and cacheable file, speeding up your site without a ton of extra work.


Server Side

var servitude = require('servitude');
var bricks = require('bricks');

var appServer = new bricks.appserver();

appServer.addRoute("/servitude/(.+)", servitude, { basedir: "./files" });
var server = appServer.createServer();


Client Side

<!-- include js/jquery.js and css/site.css in one fell swoop -->
<script type="text/javascript" src="/servitude/js/jquery.js,css/site.css"></script>

That's it!

npm loves you