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

guilder

v0.2.2

Published

builder for g's

Readme

guilder

A project builder for g's

install

$ npm install guilder

For the image resizing you need ImageMagick on your system

usage

guilder is a toolkit for scaffolding and building projects using source template folders.

It has tools for the following jobs:

  • folder copy/initialization
  • image resizing
  • writing data to template pages (using ejs)
  • installing/building components

You use it as a library in custom build scripts:

var Guilder = require('guilder')

// where does the app template live
var source = __dirname + '/gametemplate'

// where are we building the app
var dest = __dirname + '/dist/test'

// create a project from the source template and the destination folder
// everything from here becomes relative
var project = Guilder(source, dest)

// handle logging
project.on('log', function(st){
	console.log(st)
})

// run through build steps in series
Guilder.series([

	function(next){
		// do something custom
		next()
	},

	// install the component in the source folder with autoReset = true
	project.installComponent(true),

	// install the component in the source folder with autoReset = true
	project.buildComponent(true),

	// this will create the destination folder with autoRemove = true
	project.ensureFolder(true),

	// copy files using globs
	project.copy('css/**', function(path){
		// you can alter the copy path here
		return path
	}),

	// resize images
	project.resizeImages('img/*.png', '590x600', function(path){
		// you can alter the copy path here
		return path
	}),

	// write data - this can be .html pages or any other text file
	project.write('config.json', JSON.stringify({}))

], function(error){
	if(error){
		console.error(error)
		process.exit(1)
	}
	else{
		process.exit()	
	}
})

api

var project = Guilder(source)

Create a new project from a source template

Guilder.parallel

Proxy to async.parallel

Guilder.series

Proxy to async.series

Guilder.copy(srcFolder, glob, destFolder)

Static version of copy where you can pass the source and destination folders explicitly

project.ensureFolder(autoRemove)

Ensure the destination folder exists - autoRemove will delete if it exists

project.installComponent(autoReset)

Install the component in the source folder - autoReset will remove the components folder before component install

project.buildComponent(autoReset)

Build the component in the source folder - autoReset will remove the build folder before component build

project.copy(srcGlob, [processPath])

Copy each file matching the srcGlob into the dest folder

processPath is a map function that lets you change the target location of each file

project.manualCopy(srcFolder, srcGlob, destFolder, [processPath])

The same as copy but you get to specific the source and destination folders

project.resizeImages(srcGlob, size, [processPath])

Resize images matching the glob into the destination location

Size is an object with width and height properties or a string of the format [width]x[height]

processPath is an optional function that can remap the destination path for the image

project.resizeImages('img/**', '100x100', function(path){
	if(path.match(/car/)){
		return 'otherfolder/car.jpg'
	}
	else{
		return path
	}
})

project.write(path, data)

Write a 'utf8' encoded text file to the file at dest/[path]

This is useful for writing templates and other data

project.template(src, target, data)

Render an ejs template loaded from src (in the source folder) and using data, then write the output to target (in the destination folder)

events

project.on('log', function(string){})

The logs are emitted to be handled in a custom way

licence

MIT