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 🙏

© 2025 – Pkg Stats / Ryan Hefner

squick

v0.1.1

Published

dustjs + markdown for gulp

Downloads

18

Readme

Squick

travis-ci build status

Squick is designed to make it easy to build static sites with gulp and dustjs, and markdown via marked.

Squick aims to do one thing well: turn markdown files and dust templates into a stream of rendered HTML files. This lets users leverage any gulp plugin they want for whatever additional features they desire.

Here is the simplest possible gulpfile to build a site using Squick:

var gulp = require("gulp");
var squick = require("squick");


gulp.task("default", function() {
  return new squick({
    content: gulp.src(["content/**/*.md"]),
    views: gulp.src(["views/**/*.html"]),
  })
    .pipe(gulp.dest("output/"));
});

This will pick up some .md files, extract their JSON front-matter, render each file via the appropriate template, and then write the results to the output folder.

configuration

The following configuration keys are recognized by Squick:

  • content a stream of markdown files, probably from gulp.src
  • views a stream of dustjs templates, probably from gulp.src
  • site (optional) an arbitrary object which will be passed to all templates as site
  • filters (optional) an object containing dust filters to be added to the dust environment.
  • helpers (optional) an object containing dust helpers to be added to the dust environment.
  • marked (optional) configuration for marked.

front-matter

Each markdown file can have a JSON-formatted object at the start of the file which will be extracted and passed to templates as post.meta. The following keys have special significance. No whitespace is allowed ahead of the JSON object.

  • template specifies the template to be used when rendering this post
  • title specifies the title of the post

Template Environment

The templates are rendered via dustjs. In addition to the standard dust filters, Squick includes the dustjs-helpers and a few helpers and filters, listed below. You can also add custom filters and helpers via the filters and helpers configuration key.

variables

The following variables are available to your templates:

  • post a post object (see below) for the current post
  • site whatever data was passed in as site in squick's configuration.

post objects

A Post object provides access to the content and front-matter for a given markdown file. It has the following properties:

  • meta example: {post.meta.tags} the contents of the given post's front matter.
  • title example {post.title} the title of the post. The title of the post is either:
    1. the value of title in the front-matter
    2. the value of the first header in the markdown content
    3. the filename of the .md file, with '.md' removed, and with dashes replaced with spaces. (eg. "This-Cool-Post.md" would become "This Cool Post")

helpers

  • @markdown takes a string and converts it from markdown to HTML. The following uses of the markdown helper are roughly equivalent.

      {@markdown content=post.content /}
      {@markdown:post.content /}
      {#post.content}<div class="wrapper">
        {@markdown /}
      </div>{/post.content}
  • @fetch takes a list of filenames and renders a block for each file. Useful for making an index page.

      {@fetch paths=post.meta.include as="article"}
        <h1>{article.title}</h1>
        {article.content}
      {/fetch}