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 🙏

© 2024 – Pkg Stats / Ryan Hefner

blanc

v1.0.1

Published

a rapid development static site generator

Downloads

29

Readme

blanc

blanc is a static site generator for the modern web featuring Jade, Markdown, LESS, Browserify and more ... It utilizes gulp to build your sites in minutes without requiring any configuration! Did I mention that it runs a livereload enabled server for rapid development? No? Ok.

Installation

npm install -g blanc

& then

mkdir site
cd site
blanc init && blanc watch

blanc will then start a development server at an available port between 8080 - 9000 and display the address in the console. This dev sever will have live-reload enabled by default!

You should then have a rapid development server setup at localhost:8080 (or a higher port if occupied). You can monitor your development through the blanc command line interface packaged with this module:

localhost

Methods

Init

blanc init <site-folder> <build-destination>

Init creates a new site in the current directory or the given . is used to determine where the rendered files should be stored. By default this value is set to ./ but you may want to change this to dist or build.

Flags

  • --silent (disables the interface)

e.g.

blanc init ./ build

Watch

blanc watch <site-folder>

Watch provides a rapid development interface (SERVER/CLI) that watches and builds as you develop. The changes then are automatically reloaded on the development server using the built-in livereload. is used to determine the site folder that was previously initialized. By default it is set to the current directory.

Flags

  • --silent (prevents notifications | use --silent="force" to disable interface)
  • --open (opens development server in browser)

e.g.

blanc watch

Build

blanc build <build-destination> --zip

Build provides a build method similar to the Watch interface but it exits once done. This is useful to build your site into an archive. is used to determine the destination of the build. By default it is set to build.

Flags

  • --silent (disables the interface)
  • --zip (archives build to a zip file)
  • --archive (alias for zip)

e.g.

blanc build ./build.zip --zip

10 Simple Rules

To take advantage of blanc you should follow a few rules:

  1. Store all Jade files in /source directory. Each file represents a specific page rendered in the root of destination folder. You can create another level of directory within this directory (e.g. ./docs/setup.jade -> example.com/docs/setup.html)
  2. Store all Jade locals in /source/_locals.json. You can then include these locals/variable in your Jade files.
  3. Store all Less files in the /stylesheets directory.
  4. Store all Less includes in the /stylesheets/includes directory.
  5. Store all Markdown files in the /markdown directory.
  6. Include Markdown files in Jade source when needed. e.g. include:markdown ../markdown/title.md
  7. Store all Javascript files in the /javascript directory.
  8. Include all Browserify modules in /javascript/master.js.
  9. Include bundle.js from /resources/bundle.js in your Jade layout.
  10. Store all additional resources (images, videos, etc.) in the /resources folder. Create great things!

What's new?

  • Events
  • API
  • Build to directory/zip
  • Launch in Browser
  • Mocha Test Suite
  • Better Init Interface
  • Improved Command Line Interface
  • Time tracker
  • Browserify support
  • OS Notifications
  • Jade locals support
  • Better error handling
  • Fixer for config file
  • Autoprefixer for Less/CSS

Live-reload

To take advantage of the livereload function you must install the LiveReload plugin or anything that provides support for livereload. Currently the only supported port is the default 35729 port.

API

You can use blanc as a module:

// Use true as the first attribute to silence blanc
var blanc = require('blanc')(<silent:Boolean>);

blanc.init(<directory>, <build-destination>, <silent>, function(error){
    blanc.watch(<directory>, <silent>, <open>, function(error, port){
        // Listen for events
        blanc.on('less:done', function(){
            console.log("LESS Files rendered!");
        })
    })
})