Index NPM packages based on package.json information.
Install with npm:
$ npm install --save npm-indexer
var npmIndexer = require('npm-indexer');
Create a stream of matching npm packages. Use the provided indexer
to collect and index the matching npm packages to create search indexes.
Params
options
{Object}: Options specifying the indexer to use and additional options for the changes stream.options.indexer
{Object}: Specify the indexer to use for creating a search index. Example: search-indexer-algolia.options.includeName
{Boolean}: Include the package name when determining if the package should be indexed. Defaults tofalse
.options.keywords
{Array}: Array of keywords to use to determine if the package should be indexed. These are matched against the package keywords and the package name ifincludeName
istrue
.options.since
{Number}: Sequence number passed to changes stream that will indicate which sequence number to start with.options.limit
{Number}: Limit the number of packages returned from the changes stream. Defaults to -1 which will be continuous.options.db
{String}: CouchDB URI to pull the changes stream from. Defaults to the NPM registry.returns
{Stream}: Returns a stream that will have matching packages.
Example
npmIndexer({
indexer: require('search-indexer-algolia')(algoliaOptions),
keywords: ['assembleplugin']
})
.on('data', console.log)
.on('end', console.log.bind(console, 'done'));
- base-search: Base plugin that adds methods for creating, updating and using search indices. | homepage
- sarge: Register and use custom search indexers to create, update and use search indices. | homepage
- search-indexer-algolia: base-search indexer to enable collecting and adding records to an algolia search index | homepage
- vinyl-changes-stream: Create a changes stream from couchdb and turn docs into Vinyl objects. | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Brian Woodward
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.4.3, on April 05, 2017.