resolve-files
Get all files from the given entry that resolved by `require`
Last updated 8 years ago by popomore .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install resolve-files 
SYNC missed versions from official npm registry.

resolve-files

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Get all files from the given entry that resolved by require

Usage

There are files in npm packages

|- package.json
|- index.js
`- lib
  `- index.js

And index.js requires lib/index.js, you can use resolve-files to get all files.

const resolve = require('resolve-files');
const result = resolve({ cwd: process.cwd() });
// =>
// [
//   '$BASEDIR/index.js',
//   '$BASEDIR/lib/index.js',
// ]

It will resolve the entry

Normally, the result will include npm modules, but you can give an options ignoreModules: true to ignore modules (only return relative files).

License

MIT

Current Tags

  • 1.0.2                                ...           latest (8 years ago)

3 Versions

  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (5)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE