ECMAScript 2015+/CommonJS module dependencies array
This package handles es2015+ modules, and 'cause CommonJS won't go away anytime soon, it also
takes care of non-dynamic require
s.
npm install --save es-deps
import esDeps from 'es-deps';
esDeps('./fixture.js')
.then(result => console.log(result)); /* [
'out', './local',
'q', 'fs', './local-cjs', 'globalImport',
] */
// esDeps :: String -> Promise Array[String]
Return a promise that resolves to dependencies array of String.
Required
Type: String
Path to JavaScript file.
- 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 unit
Object { requested, from, resolved }
- es-deps-deep — ECMAScript 2015+/CommonJS module dependencies resolved in depth
- es-dep-kit — ECMAScript 2015+/CommonJS module dependencies helpers kit
MIT © Vladimir Starkov