npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

servmix

v0.0.3

Published

static server for

Readme

install

(sudo) npm install servmix -g

use in express/connect.

var app = new Connect();
var servmix = require('servmix');
app.use(servmix.middleware(options));

app.listen(port);

use in node

var Servmix = require('servmix').Service;
var servmix = new Servmix(options);
servmix.compile(url, function(err, file) {
    if(err) {
        // throw
    }
    // file object. with attributes contents and ext. detail in [filo](http://github.com/akecn/filo) 
});

use servmix as static server.

servmix --cwd  

configure style

you can config in servmix.json:

{
    "rules": [
        {
            "globs": "*.md",
            "tasks": "markdown"
        },
        {
            "globs": "*.css",
            "tasks": ["less", "minify"]
        },
        {
            "globs": ["test/*.js", "!sea.js"],
            "tasks": [{
                "name": "wrap",
                "type": "amd"
            }]
        }
    ]
}

default extension

less

compile less to css

markdown

compile markdown to html

babel

compile es6 to es5

wrap

auto wrap js with define(function(require, exports, module) { <% ="your code"%> })

minify

minify js and css code

and also you can extend extension by yourself.

create your extension

add extend property for servmix.json:

{
    "extend": "path/to/your/extension/dir/or/file"
}

if extend is file, then the exports will be your extensions.

module.exports = {
    "less": function(filo, options) {
        return through2.obj(function(file, enc, callback) {
            // the file is vinyl object. so create extension just like develop plugin for gulp
        });
    }
}

or extend is directory, every file in the directory will be read as an extension. see lib/extensions/

gulp style

create servmix.js:

var servmix = require('servmix'),
    babel = require('gulp-babel'),
    through2 = require('through2');
servmix.request(["*.js", "!sea.js"], function(stream, filo) {
    stream
        .pipe(through2.obj(function(file, enc, callback) {
            // different with gulp. the file may be isNull.because the path come from url.
            // so change extension
            filo.extension(file, '.es');
            // then read the real file.
            if(filo.available(file)) {
                file.contents = filo.readFile(file);
                file.stat = filo.fileStat(file);
            }
            callback(null, file);
        }))
        // then just use gulp-plugin
        .pipe(babel());
});

// important!!
module.exports = servmix;

TODO

  • watch config file change
  • html extension
  • pass configure, not only read cfg file.
  • clone example file
  • livereload
  • more extension support?