Lawsun d230cfbce0 first commit vor 2 Jahren
..
node_modules d230cfbce0 first commit vor 2 Jahren
History.md d230cfbce0 first commit vor 2 Jahren
LICENSE d230cfbce0 first commit vor 2 Jahren
README.md d230cfbce0 first commit vor 2 Jahren
index.js d230cfbce0 first commit vor 2 Jahren
package.json d230cfbce0 first commit vor 2 Jahren

README.md

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