File tree 7 files changed +272
-286
lines changed
7 files changed +272
-286
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ var tree = dependencyTree({
21
21
directory: ' path/to/all/files' ,
22
22
requireConfig: ' path/to/requirejs/config' , // optional
23
23
webpackConfig: ' path/to/webpack/config' , // optional
24
+ tsConfig: ' path/to/typescript/config' , // optional
24
25
nodeModulesConfig: {
25
26
entry: ' module'
26
27
}, // optional
@@ -41,6 +42,7 @@ var list = dependencyTree.toList({
41
42
42
43
* ` requireConfig ` : path to a requirejs config for AMD modules (allows for the result of aliased module paths)
43
44
* ` webpackConfig ` : path to a webpack config for aliased modules
45
+ * ` tsConfig ` : path to a typescript config (or a preloaded object representing the typescript config)
44
46
* ` nodeModulesConfig ` : config for resolving entry file for node_modules
45
47
* ` visited ` : object used for avoiding redundant subtree generations via memoization.
46
48
* ` nonExistent ` : array used for storing the list of partial paths that do not exist
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const Config = require('./lib/Config');
21
21
* Format is a filename -> tree as list lookup table
22
22
* @param {Array } [options.nonExistent] - List of partials that do not exist
23
23
* @param {Boolean } [options.isListForm=false]
24
+ * @param {String|Object } [options.tsConfig] Path to a typescript config (or a preloaded one).
24
25
* @return {Object }
25
26
*/
26
27
module . exports = function ( options ) {
@@ -107,7 +108,8 @@ module.exports._getDependencies = function(config) {
107
108
ast : precinct . ast ,
108
109
config : config . requireConfig ,
109
110
webpackConfig : config . webpackConfig ,
110
- nodeModulesConfig : config . nodeModulesConfig
111
+ nodeModulesConfig : config . nodeModulesConfig ,
112
+ tsConfig : config . tsConfig
111
113
} ) ;
112
114
113
115
if ( ! result ) {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class Config {
14
14
this . webpackConfig = options . webpackConfig ;
15
15
this . nodeModulesConfig = options . nodeModulesConfig ;
16
16
this . detectiveConfig = options . detective || options . detectiveConfig || { } ;
17
+ this . tsConfig = options . tsConfig ;
17
18
18
19
this . filter = options . filter ;
19
20
You can’t perform that action at this time.
0 commit comments