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

gwcsshbs

v0.1.2

Published

Groundwork CSS 2 Web-Page Templates using Handlebars

Downloads

7

Readme

Groundwork CSS 2 Web-Page Templates using Handlebars

var gwcsshbs = require('gwcsshbs');

Installation

$ npm install gwcsshbs

Installation Dependencies

  • Node JS (v0.10.29+) - http://www.nodejs.org

Features

Philosophy

Reuable handlebars templates for UI design/prototyping with live preview based on GroundworkCSS responsive web-design. The idea is to use the existing templates as the starting point, and then refine them to suit individual UX needs.

APIs

Overview

This module provides handlebars-based basic building blocks for creating web-pages using GroundworkCSS responsive web-design. It also provides a UI Live Preview design/prototyping environment. Reuse the layouts via block-helpers:

  • #extend - extend a defined partial
  • #block - define a block within a partial
  • #append - append to a defined block
  • #prepend - prepend to a defined block
  • #replace - replace a defined block

See templates-folder & preview.js for usage details.

Live Preview

Run preview.js using Node JS ("node preview.js"), and view the sample web-pages in the browser. Each of the view is available as as web-page at /[view] in the browser on port 8080 (for e.g., http://localhost:8080/home). All changes made to the templates are available as "live" preview in the browser. The changes are monitored and the re-compiled automatically; also, the view in the browser(s) is refreshed. The live preview is very useful when designing UX for multiple browsers (e.g., browser compatibility) and/or multiple form-factors (e.g. mobiles, tablets, and desktops). As you build the UX, you can open the web-page in multiple browsers/devices, and monitor & debug the changes without the need to refresh the web-pages in the browsers.

Any new views added to the system will need a restart of the node preview.js server. You may consider using other solutions like nodemon in case you want to restart the node server automatically.

View (static) data is available in viewList[] of preview.js file. Some additional settings are available to control some features provided by this module:

var viewList = {
    'home': {
        gwcsshbs: { // settings
            autoPageRefresh: true // web-page auto refresh
        }
    }
};

Templates structure

The current template structure is aligned to the sample web-pages provided by GroudworkCSS. However, most of it can be re-used with minor modifications to suit inidividual UX needs. Also, you can change the complete structure with a little effort. Below picture provides an overview of the templates structure.

Templates-Layout

There are other useful templates which are used as building blocks for the pages. Please view the partials & helpers folder in templates.

GroundworkCSS & Documentation

The setup tries to replicate the web-page samples provided by GroundworkCSS. For easy reference, the documentation is linked to locally hosted GroundworkCSS pages. If you are lost in the documentation, and want to come back to prototyping, just click on the top-logo of any page.

gwcsshbs.init(callback)

This API initializes the module and sets-up the handlebars templating system. On successful initialization, the callback provides an event-emitter useful for handling events from within the module (e.g., refresh).

var webexhbs = require('webexhbs'),
    expresss = require('express'),
    gwcssResources = gwcsshbs.resources(express);

gwcsshbs.init(function (err, emitter) {...});

gwcsshbs.resources(express)

All the GroundworkCSS static resources (CSS, JS, Fonts, etc.) are available via this API.

var webexhbs = require('webexhbs'),
    expresss = require('express'),
    gwcssResources = gwcsshbs.resources(express);

var app = express();
    app.use('/', gwcssResources);

gwcsshbs.renderFile()

Use engine.renderFile as the view-engine for Express JS environment.

var express = require('express'),
    gwcsshbs = require('gwcsshbs'),
    engine = webexhbs.engine;

app = express();
app.engine('hbs', gwcsshbs.renderFile);

gwcsshbs.enableLogging()

The handlebars engine logs messages using handlebars-logger. These messages may be useful for debugging purposes.

Handlebars templates

The handlebars template assets are available within the "templates" directory. They are divided as:

  • helpers - Handlebars helpers used within partials
  • partials - Handlebars re-usable partials based on GroundworksCSS
  • views - Sample web-pages using templates

Handlebars module

The handlebars module is export'ed from the main-module. This module instance has all the templates compiled and loaded for use.

var webexhbs = require('webexhbs'),
    handlebars = webexhbs.handlebars;

License

MIT