/assemble-redirects

Assemble pipeline plugin for generating a redirects file from a stream of manifest files.

Primary LanguageJavaScriptMIT LicenseMIT

assemble-redirects NPM version

Generate a redirects file from a stream of manifest files.

Install

Install with npm:

$ npm i assemble-redirects --save

Usage

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

API

redirects

Generate a redirects.json file from a stream of manifest.json files.

Params

  • app {Object}: Instance of an app that's inherited from [templates][].
  • options {Object}: Additional options used to control redirects.json file.
  • options.path {String}: Path to be set on newly created file. (Defaults to redirects.json)
  • returns {Stream}: Stream that can be used in a pipeline.

Example

app.src(patterns)
  .pipe(redirects(app))
  .on('data', function(file) {
    if (file.path === 'redirects.json') {
      console.log(file.content);
    }
  });

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
  • generate: Fast, composable, highly extendable project generator with a user-friendly and expressive API. | homepage
  • templates: System for creating and managing template collections, and rendering templates with any node.js template engine.… 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

Brian Woodward

License

Copyright © 2016 Brian Woodward Released under the MIT license.


This file was generated by verb on January 18, 2016.