Socket
Book a DemoInstallSign in
Socket

load-plugins

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

load-plugins

Load plugins for gulp, grunt, assemble, verb any node.js app that needs to load plugins from node_modules or local folders.

Source
npmnpm
Version
0.2.4
Version published
Weekly downloads
208
31.65%
Maintainers
1
Weekly downloads
 
Created
Source

load-plugins NPM version

Load plugins for gulp, grunt, assemble, verb any node.js app that needs to load plugins from node_modules or local folders.

Install

Install with npm

npm i load-plugins --save

Run tests

npm test

Usage

with gulp

var plugin = plugins('gulp-*');

gulp.task('default', function () {
  gulp.src('test/*.js')
    .pipe(plugin.jshint());
    .pipe(plugin.mocha());
});

with assemble

var plugin = plugins('assemble-*');

assemble.task('default', function () {
  assemble.src('test/*.js')
    .pipe(plugin.jshint());
    .pipe(plugin.mocha());
});

Options

See resolve-dep for additional options.

options.require

Pass a custom function for requireing files.

plugins('gulp-*', {
  require: function(filepath) {
    // do stuff to filepath
  }
});

options.camelize

Make plugin names camelcased. By default this is false.

options.rename

Pass a rename function to change how plugins are named.

plugins('my-plugins-*', {
  rename: function (filepath) {
    return path.basename(filepath);
  }
});

options.omit

Omit strings from plugin names. This is a complement to the .rename() option, it's easiest to understand by way of example:

plugins('gulp-*', {omit: 'gulp'});

Returns {mocha: [Function]} instead of {'gulp-mocha': [Function]}, and so on.

You may also pass an array of strings to omit, or use braces, e.g.:

// note that the `omit` option doesn't work with full glob patterns, just braces
plugins('{foo,bar}-*', {omit: '{foo,bar}'});

API

Contributing

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

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license

This file was generated by verb-cli on October 22, 2014.

Keywords

assemble

FAQs

Package last updated on 22 Oct 2014

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