Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assemble-render-file

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble-render-file

Assemble plugin for rendering views in a vinyl pipeline.

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

assemble-render-file NPM version Build Status

Assemble plugin for rendering views in a vinyl pipeline.

Heads up!

This requires the assemble-vinyl plugin to work.

Install

Install with npm:

$ npm i assemble-render-file --save

Usage

var renderFile = require('assemble-render-file');
var assemble = require('assemble');

// register as an instance plugin with assemble
var app = assemble()
  .use(renderFile());

// then use in a vinyl pipeline
app.src('*.hbs')
  .pipe(app.renderfile())
  .pipe(app.dest('foo'));

noop engine

By default, when no engine is found for a file an error is thrown. To get around this you can either define a noop engine, or use disable the engineStrict option.

A noop engine follows the same signature as any engine, but must be registered using the key: noop.

Example

app.engine('noop', function(view, opts, next) {
  // do whatever you want to `view`, or nothing
  next(null, view);
});

Options

options.engineStrict

By default, when no engine is found for a file an error is thrown. This can be disabled with the following:

app.option('engineStrict', false);

When disabled and an engine is not found, files are just passed through.

  • assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
  • assemble-loader: Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with… 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 06, 2016.

Keywords

FAQs

Package last updated on 06 Jan 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc