🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

assemble-scaffold

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble-scaffold

Generate project scaffolds with assemble and Scaffold.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

assemble-scaffold NPM version

Generate project scaffolds with assemble and Scaffold.

Install

Install with npm

$ npm i assemble-scaffold --save

Usage

var assemble = require('assemble');
var scaffold = require('assemble-scaffold');

// register the plugin, add options if needed
var app = assemble()
  .use(scaffold({cwd: 'scaffolds/'}))

Register scaffolds

Uses [scaffold][] to create normalize configuration objects:

app.scaffold('ejs', {
  src: ['templates/ejs/*.ejs'],
  dest: 'src/templates'
});

The created configuration object looks something like:

[ { src: [ 'templates/ejs/foo.ejs', 'templates/ejs/bar.ejs' ],
    dest: 'src/templates',
    options: { cwd: 'scaffolds' },
    name: 'ejs' } ]

Generate scaffold

Which can easily be generated by calling the scaffold's generate method:

scaffold('ejs')
  // destination base is optional
  .generate('dest/', function(err) {
    if (err) console.error(err);
  });

Plugins

Plugins may also be used by passing them to the .use() method on the scaffold instance. It's also chainable.

scaffold('ejs')
  // plugins
  .use(function(config) {
    config.files.forEach(function(file) {
      // do something to `file`
    });
  })
  .use(function(config) {
    config.dest = 'foo/' + config.dest;
  })
  .generate(function(err) {
    if (err) console.error(err);
  });
  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more | homepage
  • expand-config: Expand tasks, targets and files in a declarative configuration. | homepage
  • expand-files: Expand glob patterns in a declarative configuration into src-dest mappings. | homepage
  • scaffold: Conventions and API for creating scaffolds that can by used by any build system or… more | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on September 13, 2015.

Keywords

assemble

FAQs

Package last updated on 13 Sep 2015

Did you know?

Socket

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.

Install

Related posts