This package has been deprecated

Author message:

Use 'components-lookup' instead

component-lookup

0.0.6 • Public • Published

component-lookup

Travis Build Status Coverage Status Dependencies

Look for components and gather information about them.

Install

npm install component-lookup

Usage

const componentLookup = require('component-lookup')

componentLookup('*/[^_]*.njk')
componentLookup('*/[^_]*.njk', { cwd: __dirname })
componentLookup('*/[^_]*.njk', { dataPaths: (fileName) => [ `${ fileName }.data.js` ] })

Parameters

  • pattern {String} - Files to look for using a glob pattern.
  • opts {?Object} - Options.
    • cwd {?String} - Directory in which to look for components. Defaults to process.cwd().
    • dataPaths {?Function} - Function that returns an array of paths to tell component-lookup the location of potential data files.

Returns

  • {Object} - Components and their information.

Package Sidebar

Install

npm i component-lookup

Weekly Downloads

1

Version

0.0.6

License

MIT

Last publish

Collaborators

  • electerious