DefinitelyTyped/types/dependency-tree/dependency-tree-tests.ts
Alexandre Djerbetian 2c84c50aee
dependency-tree: add tsConfig to options (#43660)
* add tsConfig to dependency-tree options

* add myself as co-owner
2020-04-06 11:10:06 -07:00

20 lines
506 B
TypeScript

import dependencyTree = require('dependency-tree');
const tree = dependencyTree({
filename: 'path/to/a/file',
directory: 'path/to/all/files',
requireConfig: 'path/to/requirejs/config',
webpackConfig: 'path/to/webpack/config',
tsConfig: 'path/to/typescript/config',
nodeModulesConfig: {
entry: 'module'
},
filter: path => path.indexOf('node_modules') === -1,
nonExistent: []
});
const list = dependencyTree.toList({
filename: 'path/to/a/file',
directory: 'path/to/all/files'
});