Package Exports
- assemble-handle
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (assemble-handle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
assemble-handle

Assemble pipeline plugin for handling middleware stages.
(TOC generated by verb using markdown-toc)
Usage
var assemble = require('assemble');
var handle = require('assemble-handle');
var app = assemble();
// create your custom handler (or use a built-in one)
app.handler('onFoo');
// create a middleware that will run when the
// `onFoo` handler is invoked
app.onFoo(/\.hbs$/, function(file, next) {
// do stuff to file
next();
});
app.task('default', function() {
return app.src('*.hbs')
// handle a builtin stage
.pipe(handle(app, 'onStream'))
// handle custom `onFoo` stage
.pipe(handle(app, 'onFoo'))
.pipe(app.dest('site/'));
});
Related projects
- assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
- assemble-core: The core assemble application with no presets or defaults. All configuration is left to the… more | homepage
- assemble-fs: Assemble plugin to add methods to assemble for working with the file system, like src,… more | homepage
- assemble-streams: Assemble plugin that adds convenience methods for working with streams, like
toStream
, which pushes a… 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 © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 12, 2016.