
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
Conventions and API for creating scaffolds that can by used by any build system or generator.
Conventions and API for creating scaffolds that can by used by any build system or generator.
Install
Install with npm
$ npm i scaffold --save
Usage
Create a reusable scaffold from one or more templates or source files:
var Scaffold = require('scaffold');
var scaffold = new Scaffold('foo', {
// `~` tildes expand to the user's home directory
options: {cwd: '~/scaffolds'},
src: ['**/component*'],
dest: 'local/src/'
});
Returns a normalized configuration object that can easily be used by any build system or generator. The config object returned from the above example would look something like this:
{
options: {
cwd: '~/scaffolds'
},
files: [{
name: 'foo'
options: {cwd: '/Users/jonschlinkert/scaffolds'},
src: ['/Users/jonschlinkert/scaffolds/scripts/component.js',
'/Users/jonschlinkert/scaffolds/styles/component.css',
'/Users/jonschlinkert/scaffolds/templates/component.hbs'
],
dest: 'local/src/',
}]
}
(Table of contents generated by verb)
Create an instance of scaffold:
var Scaffold = require('scaffold');
var foo = new Scaffold('foo', {
// config/options here
});
Scaffold uses expand-target and expand-files as dependencies. Visit those projects for the full range of available features and options:
There are many different ways to create scaffolds, the possibilities are endless. The following are just a few random examples of what a scaffold could be, but don't be limited by my imagination!
Blog post
Create a scaffold for adding blog posts to a project:
var post = new Scaffold('post', {
options: {cwd: 'scaffolds'},
src: 'content/post.md',
dest: 'src/posts/'
});
UI components
Create a scaffold for adding UI components to a project:
var component = new Scaffold('component', {
options: {cwd: 'scaffolds'},
files: [
{src: 'templates/component.hbs', dest: 'src/templates/'},
{src: 'scripts/component.js', dest: 'src/scripts/'},
{src: 'styles/component.css', dest: 'src/styles/'},
]
});
dotfiles
Create a scaffold for dotfiles to use when initializing new projects:
var dotfiles = new Scaffold('dotfiles', {
// glob pattern for dotfiles
src: ['templates/.*'],
options: {
// filter out `.DS_Store` files
filter: function (fp) {
return !/\.DS_Store/.test(fp);
}
}
});
Create a new Scaffold with the given name and config.
Params
name {String}: The name of the scaffold.config {Object}: The scaffold's configuration object.Example
var component = new Scaffold('component', {
src: ['~/templates/*.js']
});
Here is a quick reference comparing the difference between boilerplates, scaffolds and templates.
| type | description | | template | Resuable file, code or content which contains "placeholder" values that will eventually be replaced with real values by a rendering (template) engine | | scaffold | Consist of one or more templates or source files and serve as a "temporary support structure" that may be used at init, or throughout the duration of a project. | | boilerplate | Boilerplates consist of all of the necessary files required to initialize a complete project. |
As of September 12, 2015:
Statements : 100% (29/29)
Branches : 100% (18/18)
Functions : 100% (3/3)
Lines : 100% (28/28)
Install dev dependencies:
$ npm i -d && gulp
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on September 12, 2015.
FAQs
Conventions and API for creating declarative configuration objects for project scaffolds - similar in format to a grunt task, but more portable, generic and can be used by any build system or generator - even gulp.
We found that scaffold demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.