Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

assemble-plugin-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble-plugin-wrapper

Easily wrap plugins to use with apps, collections, and/or views.

Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

assemble-plugin-wrapper NPM version Build Status

Easily wrap plugins to use with apps, collections, and/or views.

Install with npm

$ npm i assemble-plugin-wrapper --save

Usage

var wrapper = require('assemble-plugin-wrapper');

API

wrapper

Wrap a plugin function to easily use it with the specified type (e.g. app, collection, view, or any)

Params

  • pluginType {String}: The type specifying where this plugin should be use.
  • pluginType.app {String}: Only use on the app
  • pluginType.collection {String}: Only use on view collections.
  • pluginType.view {String}: Only use on view instances.
  • pluginType.any {String}: Use with any of the plugin types.
  • fn {Function}: Function to use as the plugin. This will be executed in the context of the specified plugin type object (e.g. app, collection, view)
  • returns {Function}: Plugin function that may be passed to .use methods on app, collection, and/or view instances

Example

app.use(wrapper('any', function () {
  this.foo = function (str) {
    return 'foo-' + str;
  };
}));

app.foo('bar');
//=> 'foo-bar'
  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more | homepage
  • templates: System for creating and managing template collections, and rendering templates with any node.js template engine.… more | homepage
  • verb: Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… 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 © 2015 Brian Woodward Released under the MIT license.

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

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