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

simple-build-kit

v1.1.2

Published

A very lightweight build toolkit for Node.js

Readme

Simple Build Kit

Build Status NPM version Dependency Status License

Introduction

Simple Build Kit is a very lightweight build toolkit for Node.js only for copying files.

It has no dependencies to other packages.

All methods are synchronous and file operations use the UTF-8 encoding.

Download

Get it from the npm registry:

npm install --save-dev simple-build-kit

Reference

Types of arguments:

  • folder - path to a folder, e.g. assets or ~/projects/first
  • path - path to a file, e.g. ./file.js or /project/lib/file.js
  • destination - path to a folder if it ends with /, and path to file otherwise , e.g. ./file.js or dest/

Methods:

setSilent(silent)

Enables or disabled silent mode. By default it's disabled. In silent mode no messages with the progress are printed to the console.

deleteFolder(folder)

Recursively deletes a folder. There is a check if the folder exists first, so it's safe to call this method always.

cleanFolder(folder)

First deletes the folder if it exists, then creates the folder.

read(path)

Reads the file and returns its contents.

concat(paths)

Reads all files and returns their content concatented.

save(path, contents)

Writes the contents to the file. If the destination folder doesn't exists, it will be created.

createFolders(destination)

Creates all missing folders for given path. Examples:

  • for dist/assets/abc, folders dist and dist/assets will be created
  • for dist/assets/abc/, folders dist, dist/assets and dist/assets/abc will be created

copy(source, destination)

Copies source file(s) to the destination.

The source can be:

  • path/to/file.js - file.js will be copied to the destination.
  • path/to/folder/ - all files from the folder will be copied to the destination.
  • path/to/file*.png - all files matching the pattern will be copied to the destination. Possible wildcards: * and ?. Note: matching subfolders will also be recursively copied.

The destination can be:

  • path/to/file.js - destination file. Only valid for single source file.
  • path/to/folder/ - destination folder. Source file(s) will be copied to the destination folder.

If the destination folder does not exist, it will be created.

list(path)

Lists files matching a pattern

The path can be:

  • path/to/file.js - Just the file.js will be returned.
  • path/to/folder/ - all files from the folder will returned.
  • path/to/file*.png - all files matching the pattern will be returned. Possible wildcards: * and ?.

Example

Below is an example build script for a Chrome extension that concatenates files and copies assets:

const build = require('simple-build-kit');

function prepare() {
	build.cleanFolder('dist');
	build.createFolders('dist/assets');
}

function contentJS() {
	const filesLib = [
		'lib/firebase-app.js',
		'lib/firebase-auth.js',
		'lib/firebase-firestore.js'
	];
	const filesSrc = [
		'src/database.js',
		'src/ui.js',
		'src/config.js',
		'src/main.js'
	];

	let res = build.concat(filesLib);

	// fix for https://github.com/firebase/firebase-js-sdk/issues/414
	res = res.replace(/\\uffff\/\.test\("[^"]+"/, '\\uffff/.test(""');

	res += build.concat(filesSrc);

	build.save('dist/content.js', res);
}

function misc() {
	build.copy('assets/*.png', 'dist/assets/');
	build.copy('background.js', 'dist/');
	build.copy('manifest.json', 'dist/');
}


prepare();
contentJS();
misc();