DefinitelyTyped/types/dependency-tree/dependency-tree-tests.ts
2018-05-15 16:19:30 +10:00

19 lines
465 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',
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'
});