
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
base-scaffold
Advanced tools
Base plugin that adds support for generating files from a declarative scaffold configuration.
Base plugin that adds support for generating files from declarative scaffold configurations.
Install with npm:
$ npm install base-scaffold --save
Can be used with any base application. See example base applications.
var scaffold = require('base-scaffold');
This example shows generate, but this plugin can be used with any base application.
var Generate = require('generate');
var Scaffold = require('scaffold');
var scaffold = new Scaffold();
var app = generate();
/**
* Add a basic "target" to our scaffold. Scaffolds are like
* grunt "tasks" and can have any number of targets
*/
scaffold.addTarget('abc', {
options: {
pipeline: generate.renderFile,
data: {
site: { title: 'My Blog' }
}
},
src: 'templates/*.hbs',
dest: 'site',
});
/**
* Template engine for rendering handlebars templates
*/
app.engine('hbs', require('engine-handlebars'));
/**
* Generate the scaffold!
*/
app.scaffold(scaffold)
.on('error', console.error)
.on('data', console.log)
.on('end', function() {
console.log('done!');
});
See the scaffold library for additional information.
Generate files from a declarative scaffold configuration and return a stream.
Params
scaffold {Object}: Scaffold configuration object.cb {Function}: Optional callback function. If not passed, .scaffoldStream will be called and a stream will be returned.Example
var Scaffold = require('scaffold');
var scaffold = new Scaffold({
options: {cwd: 'source'},
posts: {
src: ['content/*.md']
},
pages: {
src: ['templates/*.hbs']
}
});
app.scaffold(scaffold, function(err) {
if (err) console.log(err);
});
Generate files from a declarative scaffold configuration.
Params
scaffold {Object}: scaffold configuration object.returns {Stream}: returns a stream with all processed files.Example
var Scaffold = require('scaffold');
var scaffold = new Scaffold({
options: {cwd: 'source'},
posts: {
src: ['content/*.md']
},
pages: {
src: ['templates/*.hbs']
}
});
app.scaffoldStream(scaffold)
.on('error', console.error)
.on('end', function() {
console.log('done!');
});
The following projects are built on base.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on May 11, 2016.
FAQs
Base plugin that adds support for generating files from a declarative scaffold configuration.
The npm package base-scaffold receives a total of 2 weekly downloads. As such, base-scaffold popularity was classified as not popular.
We found that base-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.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.