Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

ECMAScript 2015+/CommonJS module dependencies resolved in depth

NotificationsYou must be signed in to change notification settings

iamstarkov/es-deps-deep

Repository files navigation

NPM versionUnix Build StatusWindows Build StatusCoveralls StatusDependency Status

ECMAScript 2015+/CommonJS module dependencies resolved in depth

Install

npm install --save es-deps-deep

Usage

importesDepsDeepfrom'es-deps-deep';esDepsDeep(['./fixtures/extended']).then(result=>console.log(result));/* [  { requested: null,    from: null,    resolved: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/index.js' },  { requested: './first/index.js',    from: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/index.js',    resolved: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/first/index.js' },  { requested: './second/index.js',    from: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/first/index.js',    resolved: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/first/second/index.js' },  { requested: '../third/index.js',    from: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/first/index.js',    resolved: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/third/index.js' },  { requested: '../first/fourth/index.js',    from: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/third/index.js',    resolved: '/Users/iamstarkov/projects/es-deps-deep/fixtures/extended/first/fourth/index.js' } ] */

Another examples withrollup andmkdirp can be found in the showcasegist.

API

esDepsDeep(files, options)

Return a promise that resolves toArray[Object], where object ises-dep-unit.

files

Required
Type:Array ofString

Entry points for your app.

options

excludeFn

Type:Function
Default:() => false;

excludeFn decides items to exclude fromes-deps-resolved each time when it's going deeper.

Related

  • es-deps — ECMAScript 2015+/CommonJS module dependencies array
  • es-deps-from-string — ECMAScript 2015+/CommonJS module dependencies array from string
  • es-deps-resolved — ECMAScript 2015+/CommonJS module dependencies resolved array
  • es-dep-unit — Constructor for ECMAScript 2015+/CommonJS dependency unitObject { requested, from, resolved }
  • es-dep-kit — ECMAScript 2015+/CommonJS module dependencies helpers kit

License

MIT ©Vladimir Starkov

About

ECMAScript 2015+/CommonJS module dependencies resolved in depth

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp