resolve-files

Get all files from the given entry that resolved by `require`

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
resolve-files
501.0.26 years ago6 years agoMinified + gzip package size for resolve-files in KB

Readme

resolve-files
!NPM versionnpm-imagenpm-url !build statustravis-imagetravis-url !Test coveragecodecov-imagecodecov-url !David depsdavid-imagedavid-url !Known Vulnerabilitiessnyk-imagesnyk-url !npm downloaddownload-imagedownload-url
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