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

kraftverk

v0.1.7

Published

Styleguide generation with KSS

Readme

Kraftverk

Kraftverk is a style guide generator. Kraftverk uses KSS for parsing CSS comments to later generate a beautiful style guide with alot of useful features.

Table of contents

Usage

First you should read up on the KSS documentation & syntax.

CLI

Currently Kraftverk does not work as a CLI.

With gulp

Kraftverk has a gulp plugin:

npm install gulp-kraftverk --save-dev

In your gulpfile.js:

var gulp      = require('gulp');
var kraftverk = require('gulp-kraftverk');

gulp.task('kraftverk', function() {
	return gulp.src('src/css/**') // or LESS/SASS/SCSS etc...
		.pipe(kraftverk(/* options */))
		.pipe(gulp.dest('styleguide/'));
});

Options

Kraftverk Options

Option | Type | Default Value | Description --- | --- | --- | --- title | string | "Styleguide" | The main title of your style guide static site. theme | string | "/theme" | Path to the style guide theme. styles | array | [] | Array of stylesheets to be included in your site examples. scripts | array | [] | Array of scripts to be included in your site examples. templates | string | "src/templates" | Path to the handlebars templates for external markup. docs | object | | Documentation options docs.dir | string | "src/docs" | Path to markdown doc files. docs.title | string | "Documentation" | Title of the docs home page. docs.index | string | "index.md" | Path to the home page relative to the docs.dir.

Theme Options

Option | Type | Default Value | Description --- | --- | --- | --- depth | integer | 2 | How deep in the KSS hierarchy to generate unique style guide pages. assets | string | "assets" | Relative path to the theme's assets. partials | string | "partials" | Relative path to the theme's handlebars partials. helpers | string | "helpers.js" | Relative path to the theme's handlebars helpers file. custom | array | ['Template', 'Transparent'] | Custom comment properties used in the theme.

Default Theme

Custom Properties

The default kraftverk theme supports additional comment properties besides the ones in KSS.

Option | Type | Default Value | Description --- | --- | --- | --- Template | docs/example/colors | dynamic | Template used for documenting you KSS comment. Kraftverk theme try to guess your prefered template between docs and example depending of you having a Markup: in your KSS comment or not. Transparent | true/false | true | Force the iframe (used for displaying examples) background to transparent. Useful for when you want to showcase single components vs. complete page templates. Defaults to true since it's more common to display smaller components by themself.

Examples

All examples are using LESS.

Template

Display your color variables in the style guide:

// Colors
//
// @red  - #ff6666
// @blue - #6666ff
//
// Template: colors
//
// Styleguide: variables.colors

@red  : #ff6666
@blue : #6666ff
Transparent

Use your site background in the style guide example (useful for showcasing pages):

// Home
//
// Markup: pages/home.hbs
//
// Transparent: false
//
// Styleguide: pages.home

.home {
    // styles
}