{"_id":"@bretkikehara/gulp-load-plugins","_rev":"5-f644cbcbbab9d24e93fcd6904ba48865","name":"@bretkikehara/gulp-load-plugins","description":"Automatically load any gulp plugins in your package.json","dist-tags":{"latest":"1.5.0-alpha"},"versions":{"1.4.0-alpha":{"name":"@bretkikehara/gulp-load-plugins","version":"1.4.0-alpha","description":"Automatically load any gulp plugins in your package.json","scripts":{"test":"npm run lint && NODE_PATH=test/global_modules mocha","lint":"eslint **/*.js"},"license":"MIT","files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/jackfranklin/gulp-load-plugins.git"},"keywords":["gulpfriendly","gulp","require","load","plugins"],"author":{"name":"Jack Franklin"},"contributors":[{"name":"Pascal Hartig"},{"name":"Ben Briggs"},{"name":"kombucha"},{"name":"Nicolas Froidure"},{"name":"Sindre Sorhus"},{"name":"Julien Fontanet","email":"julien.fontanet@vates.fr"},{"name":"Callum Macrae"},{"name":"Hutson Betts"},{"name":"Christian Maniewski"},{"name":"Connor Peet"},{"name":"Dorian Camilleri"},{"name":"Carlos Henrique"},{"name":"iamfrontender","email":"iamfrontender@gmail.com"},{"name":"Brian Woodward"}],"dependencies":{"array-unique":"^0.2.1","fancy-log":"^1.2.0","findup-sync":"^0.4.0","gulplog":"^1.0.0","has-gulplog":"^0.1.0","micromatch":"^2.3.8","resolve":"^1.1.7"},"devDependencies":{"capture-stream":"^0.1.2","eslint":"2.13.1","eslint-config-standard":"5.3.1","eslint-plugin-promise":"1.3.2","eslint-plugin-standard":"1.3.2","mocha":"^2.1.0","proxyquire":"^1.0.1","sinon":"^1.9.1"},"gitHead":"5997b354a52f3f7955375b2353e81fe12463753b","bugs":{"url":"https://github.com/jackfranklin/gulp-load-plugins/issues"},"homepage":"https://github.com/jackfranklin/gulp-load-plugins#readme","_id":"@bretkikehara/gulp-load-plugins@1.4.0-alpha","_shasum":"9ea95164db0d6ee69375e626d7a2b2e2ac444ec5","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"bretkikehara","email":"bret.k.ikehara@gmail.com"},"dist":{"shasum":"9ea95164db0d6ee69375e626d7a2b2e2ac444ec5","tarball":"https://registry.npmjs.org/@bretkikehara/gulp-load-plugins/-/gulp-load-plugins-1.4.0-alpha.tgz","integrity":"sha512-EsgPb3FWbNgZDooV/J3ATIc/lp0htsVnPO9gyUblWYy1G7SNF6lh3Dnv6cm82TJ/FBXPfirwcss3pTY6a6ENgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpkqmNQ7xlmV7UrFY6EXkt0lQzixgzocT0WjRyL9QJJwIhANBT5SgA82DIwHXz/K6/RJMbTlYJrNzdiLIzyWaZWtu7"}]},"maintainers":[{"name":"bretkikehara","email":"bret.k.ikehara@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/gulp-load-plugins-1.4.0-alpha.tgz_1476513007788_0.1660790250170976"}},"1.5.0-alpha":{"name":"@bretkikehara/gulp-load-plugins","version":"1.5.0-alpha","description":"Automatically load any gulp plugins in your package.json","scripts":{"test":"npm run lint && NODE_PATH=test/global_modules mocha","lint":"eslint **/*.js"},"license":"MIT","files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/jackfranklin/gulp-load-plugins.git"},"keywords":["gulpfriendly","gulp","require","load","plugins"],"author":{"name":"Jack Franklin"},"contributors":[{"name":"Pascal Hartig"},{"name":"Ben Briggs"},{"name":"kombucha"},{"name":"Nicolas Froidure"},{"name":"Sindre Sorhus"},{"name":"Julien Fontanet","email":"julien.fontanet@vates.fr"},{"name":"Callum Macrae"},{"name":"Hutson Betts"},{"name":"Christian Maniewski"},{"name":"Connor Peet"},{"name":"Dorian Camilleri"},{"name":"Carlos Henrique"},{"name":"iamfrontender","email":"iamfrontender@gmail.com"},{"name":"Brian Woodward"},{"name":"Zach Schnackel","email":"info@zslabs.com"},{"name":"Bret K. Ikehara","email":"bret.k.ikehara@gmail.com"}],"dependencies":{"array-unique":"^0.2.1","fancy-log":"^1.2.0","findup-sync":"^0.4.0","gulplog":"^1.0.0","has-gulplog":"^0.1.0","micromatch":"^2.3.8","resolve":"^1.1.7"},"devDependencies":{"capture-stream":"^0.1.2","eslint":"2.13.1","eslint-config-standard":"5.3.1","eslint-plugin-promise":"1.3.2","eslint-plugin-standard":"1.3.2","mocha":"^2.1.0","proxyquire":"^1.0.1","sinon":"^1.9.1"},"gitHead":"0d293d28601f4d33909b30d594f91fc6ddf11154","bugs":{"url":"https://github.com/jackfranklin/gulp-load-plugins/issues"},"homepage":"https://github.com/jackfranklin/gulp-load-plugins#readme","_id":"@bretkikehara/gulp-load-plugins@1.5.0-alpha","_shasum":"3f2397a578f9e1ed13db34fdeff5cddc6bc0f260","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"bretkikehara","email":"bret.k.ikehara@gmail.com"},"dist":{"shasum":"3f2397a578f9e1ed13db34fdeff5cddc6bc0f260","tarball":"https://registry.npmjs.org/@bretkikehara/gulp-load-plugins/-/gulp-load-plugins-1.5.0-alpha.tgz","integrity":"sha512-X3BXQPNXZMVn08TjuwbHB6F+KYvZgfePlVmtZrh3y9ViIYFw5qhJAHHhU3gGazwgAABHtYFuFbrEz3OrNaHmiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALDCkZ+SDWqYo2S2uZ7Rw5LtKgSDI9wpJYuYDzTklUTAiEArdjeNI+JO2bnvnMUSkLUYz1++C6gFmFAuCrKvlrRXdg="}]},"maintainers":[{"name":"bretkikehara","email":"bret.k.ikehara@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/gulp-load-plugins-1.5.0-alpha.tgz_1485667578470_0.03645843220874667"}}},"readme":"# gulp-load-plugins\n\n[![npm](https://nodei.co/npm/gulp-load-plugins.svg?downloads=true)](https://nodei.co/npm/gulp-load-plugins/)\n\n> Loads gulp plugins from package dependencies and attaches them to an object of your choice.\n\n[![Build Status](https://travis-ci.org/jackfranklin/gulp-load-plugins.svg?branch=master)](https://travis-ci.org/jackfranklin/gulp-load-plugins)\n\n\n## Install\n\n```sh\n$ npm install --save-dev gulp-load-plugins\n```\n\n\n## Usage\n\nGiven a `package.json` file that has some dependencies within:\n\n```json\n{\n    \"dependencies\": {\n        \"gulp-jshint\": \"*\",\n        \"gulp-concat\": \"*\"\n    }\n}\n```\n\nAdding this into your `Gulpfile.js`:\n\n```js\nvar gulp = require('gulp');\nvar gulpLoadPlugins = require('gulp-load-plugins');\nvar plugins = gulpLoadPlugins();\n```\n\nOr, even shorter:\n\n```js\nvar plugins = require('gulp-load-plugins')();\n```\n\nWill result in the following happening (roughly, plugins are lazy loaded but in practice you won't notice any difference):\n\n```js\nplugins.jshint = require('gulp-jshint');\nplugins.concat = require('gulp-concat');\n```\n\nYou can then use the plugins just like you would if you'd manually required them, but referring to them as `plugins.name()`, rather than just `name()`.\n\nThis frees you up from having to manually require each gulp plugin.\n\n## Options\n\nYou can pass in an object of options that are shown below: (the values for the keys are the defaults):\n\n```js\ngulpLoadPlugins({\n    DEBUG: false, // when set to true, the plugin will log info to console. Useful for bug reporting and issue debugging\n    pattern: ['gulp-*', 'gulp.*', '@*/gulp{-,.}*'], // the glob(s) to search for\n    overridePattern: true, // When true, overrides the built-in patterns. Otherwise, extends built-in patterns matcher list.\n    config: 'package.json', // where to find the plugins, by default searched up from process.cwd()\n    scope: ['dependencies', 'devDependencies', 'peerDependencies'], // which keys in the config to look within\n    replaceString: /^gulp(-|\\.)/, // what to remove from the name of the module when adding it to the context\n    camelize: true, // if true, transforms hyphenated plugins names to camel case\n    lazy: true, // whether the plugins should be lazy loaded on demand\n    rename: {}, // a mapping of plugins to rename\n    renameFn: function (name) { ... }, // a function to handle the renaming of plugins (the default works)\n    postRequireTransforms: {}, // see documentation below\n    maintainScope: true // toggles loading all npm scopes like non-scoped packages\n});\n```\n\n## Multiple `config` locations\n\nWhile it's possile to grab plugins from another location, often times you may want to extend from another package that enables you to keep your own `package.json` free from duplicates, but still add in your own plugins that are needed for your project. Since the `config` option accepts an object, you can merge together multiple locations using the [lodash.merge](https://www.npmjs.com/package/lodash.merge) package:\n\n```js\nvar merge = require('lodash.merge');\n\nvar packages = merge(\n  require('dep/package.json'),\n  require('./package.json')\n);\n\n// Utilities\nvar $ = gulpLoadPlugins({\n  config: packages\n});\n\n```\n\n## `postRequireTransforms` (1.3+ only)\n\nThis enables you to transform the plugin after it has been required by gulp-load-plugins.\n\nFor example, one particular plugin (let's say, `gulp-foo`), might need you to call a function to configure it before it is used. So you would end up with:\n\n```js\nvar $ = require('gulp-load-plugins')();\n$.foo = $.foo.configure(...);\n```\n\nThis is a bit messy. Instead you can pass a `postRequireTransforms` object which will enable you to do this:\n\n```js\nvar $ = require('gulp-load-plugins')({\n  postRequireTransforms: {\n    foo: function(foo) {\n      return foo.configure(...);\n    }\n  }\n});\n\n$.foo // is already configured\n```\n\nEverytime a plugin is loaded, we check to see if a transform is defined, and if so, we call that function, passing in the loaded plugin. Whatever this function returns is then used as the value that's returned by gulp-load-plugins.\n\nFor 99% of gulp-plugins you will not need this behaviour, but for the odd plugin it's a nice way of keeping your code cleaner.\n\n\n## Renaming\n\nFrom 0.8.0, you can pass in an object of mappings for renaming plugins. For example, imagine you want to load the `gulp-ruby-sass` plugin, but want to refer to it as just `sass`:\n\n```js\ngulpLoadPlugins({\n  rename: {\n    'gulp-ruby-sass': 'sass'\n  }\n});\n```\n\nNote that if you specify the `renameFn` options with your own custom rename function, while the `rename` option will still work, the `replaceString` and `camelize` options will be ignored.\n\n## npm Scopes\n\n`gulp-load-plugins` comes with [npm scope](https://docs.npmjs.com/misc/scope) support. By default, the scoped plugins are accessible through an object on `plugins` that represents the scope. When `maintainScope = false`, the plugins are available in the top level just like any other non-scoped plugins.\n\n__Note:__ `maintainScope` is only available in Version 1.4.0 and up.\n\nFor example, if the plugin is `@myco/gulp-test-plugin` then you can access the plugin as shown in the following example:\n\n```js\nvar scoped = require('gulp-load-plugins')({\n  // true is the default value\n  maintainScope: true,\n});\n\nscoped.myco.testPlugin();\n\nvar nonScoped = require('gulp-load-plugins')({\n  maintainScope: false,\n});\n\nnonScoped.testPlugin();\n```\n\n## Lazy Loading\n\nIn 0.4.0 and prior, lazy loading used to only work with plugins that return a function. In newer versions though, lazy loading should work for any plugin. If you have a problem related to this please try disabling lazy loading and see if that fixes it. Feel free to open an issue on this repo too.\n\n## Override Pattern\n\nIn 1.4.0 and prior, configuring the `pattern` option would override the built-in `['gulp-*', 'gulp.*', '@*/gulp{-,.}*']`. If `overridePattern: false`, the configured `pattern` will now extends the built-in matching.\n\nFor example, both are equivilant statements.\n```js\nvar overridePlugins = require('gulp-load-plugins')({\n  // true is the default value\n  overridePattern: true,\n  pattern: ['gulp-*', 'gulp.*', '@*/gulp{-,.}*', 'foo-bar']\n});\n\nvar extendedPlugins = require('gulp-load-plugins')({\n  overridePattern: false,\n  pattern: ['foo-bar']\n});\n```\n\n## Credit\n\nCredit largely goes to @sindresorhus for his [load-grunt-plugins](https://github.com/sindresorhus/load-grunt-tasks) plugin. This plugin is almost identical, just tweaked slightly to work with Gulp and to expose the required plugins.\n\n\n## Changelog\n\n##### 1.4.0\n- added `maintainScope` - thanks @bretkikehara - [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/126)\n\n##### 1.3.0\n- added `postRequireTransforms` - thanks @vinitm - [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/119)\n\n##### 1.2.4\n- Fix bug in 1.2.3 release that stopped logging output in Gulp 3 - thanks @doowb\n\n##### 1.2.3\n- Update dependencies in line with Gulp 4 - [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/108) - thanks @doowb\n\n##### 1.2.2\n- revert the previous PR in 1.2.1 which broke configuration loading for some users\n\n##### 1.2.1\n- fix using the wrong `require` function - [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/104) - thanks @mwessner\n\n##### 1.2\n- throw an error if two packages are loaded that end up having the same name after the `replaceString` has been removed - thanks @carloshpds\n\n##### 1.1\n- added `DEBUG` option to turn on logging and help us debug issues - thanks @dcamilleri\n\n\n##### 1.0.0\n- added `renameFn` function to give users complete control over the name a plugin should be given when loaded - thanks @callumacrae\n\n##### 1.0.0-rc.1\n- This is the first release candidate for what will become version 1 of gulp-load-plugins. Once a fix for [#70](https://github.com/jackfranklin/gulp-load-plugins/issues/70) is landed, I plan to release V1.\n- **Breaking Change** support for `NODE_PATH` is no longer supported. It was causing complexities and in [the PR that droppped support](https://github.com/jackfranklin/gulp-load-plugins/pull/75) no one shouted that they required `NODE_PATH` support.\n\n##### 0.10.0\n- throw a more informative error if a plugin is loaded that gulp-load-plugins can't find. [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/68) - thanks @connor4312\n- allow `require` to look on the `NODE_PATH` if it can't find the module in the working directory. [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/69) - thanks @chmanie\n\n##### 0.9.0\n- add support for npm-scoped plugins. [PR](https://github.com/jackfranklin/gulp-load-plugins/pull/63) - thanks @hbetts\n\n##### 0.8.1\n- fixed a bug where gulp-load-plugins would use the right `package.json` file but the wrong `node_modules` directory - thanks @callumacrae\n\n##### 0.8.0\n- add the ability to rename plugins that gulp-load-plugins loads in.\n\n##### 0.7.1\n- add `files` property to package.json so only required files are downloaded when installed - thanks @shinnn\n\n\n##### 0.7.0\n- support loading plugins with a dot in the name, such as `gulp.spritesmith` - thanks to @MRuy\n- upgrade multimatch to 1.0.0\n\n\n##### 0.6.0\n- Fix issues around plugin picking wrong package.json file - thanks @iliakan (see [issue](https://github.com/jackfranklin/gulp-load-plugins/issues/35)).\n\n##### 0.5.3\n- Show a nicer error if the plugin is unable to load any configuration and hence can't find any dependencies to load\n\n##### 0.5.2\n- Swap out globule for multimatch, thanks @sindresorhus.\n\n##### 0.5.1\n- Updated some internal dependencies which should see some small improvements - thanks @shinnn for this contribution.\n\n##### 0.5.0\n- improved lazy loading so it should work with plugins that don't just return a function. Thanks to @nfroidure for help with this.\n\n##### 0.4.0\n- plugins are lazy loaded for performance benefit. Thanks @julien-f for this.\n\n##### 0.3.0\n- turn the `camelize` option on by default\n\n##### 0.2.0\n- added `camelize` option, thanks @kombucha.\n- renamed to `gulp-load-plugins`.\n\n##### 0.1.1\n- add link to this repository into `package.json` (thanks @ben-eb).\n\n##### 0.1.0\n- move to `gulpLoadplugins` returning an object with the tasks define.\n\n##### 0.0.5\n- added `replaceString` option to configure exactly what gets replace when the plugin adds the module to the context\n\n##### 0.0.4\n- fixed keyword typo so plugin appears in search for gulp plugins\n\n##### 0.0.3\n- removed accidental console.log I'd left in\n\n##### 0.0.2\n- fixed accidentally missing a dependency out of package.json\n\n##### 0.0.1\n- initial release\n","maintainers":[{"name":"bretkikehara","email":"bret.k.ikehara@gmail.com"}],"time":{"modified":"2022-06-12T15:29:03.056Z","created":"2016-10-15T06:30:08.030Z","1.4.0-alpha":"2016-10-15T06:30:08.030Z","1.5.0-alpha":"2017-01-29T05:26:20.363Z"},"homepage":"https://github.com/jackfranklin/gulp-load-plugins#readme","keywords":["gulpfriendly","gulp","require","load","plugins"],"repository":{"type":"git","url":"git+https://github.com/jackfranklin/gulp-load-plugins.git"},"contributors":[{"name":"Pascal Hartig"},{"name":"Ben Briggs"},{"name":"kombucha"},{"name":"Nicolas Froidure"},{"name":"Sindre Sorhus"},{"name":"Julien Fontanet","email":"julien.fontanet@vates.fr"},{"name":"Callum Macrae"},{"name":"Hutson Betts"},{"name":"Christian Maniewski"},{"name":"Connor Peet"},{"name":"Dorian Camilleri"},{"name":"Carlos Henrique"},{"name":"iamfrontender","email":"iamfrontender@gmail.com"},{"name":"Brian Woodward"},{"name":"Zach Schnackel","email":"info@zslabs.com"},{"name":"Bret K. Ikehara","email":"bret.k.ikehara@gmail.com"}],"author":{"name":"Jack Franklin"},"bugs":{"url":"https://github.com/jackfranklin/gulp-load-plugins/issues"},"license":"MIT","readmeFilename":"README.md"}