angular / dgeni-packages

A collection of dgeni packages for generating documentation from source code.
MIT License
142 stars 101 forks source link

TypeScript basePath behaviour has changed. #241

Closed alekhrycaiko closed 7 years ago

alekhrycaiko commented 7 years ago

When setting your typescript's basePath to 'src' in v0.19.0 (like below), a successful dgeni run could be made; yet this fails in v0.20.0

// e.g.
|  readTypeScriptModules.basePath = path.resolve(PROJECT_ROOT, 'src');

My logs show that using this syntax, the node_modules/src folder will be searched during a dgeni run; which is not correct. I'm suspicious as to whether this behaviour is intended; and if it is would it be possible to add documentation for this? I found that by upgrading to v0.20.0 and changing my basePath like below, I was able to run dgeni error free

|  readTypeScriptModules.basePath = path.resolve(PROJECT_ROOT, '');
petebacondarwin commented 7 years ago

Sorry not to reply sooner. I am glad you got it to work. I am not sure whether there was an explicit breaking change that caused your errors. Perhaps it was related to https://github.com/angular/dgeni-packages/commit/b7b11164?

Closing, as there appears to be a workaround and I am pretty confident that the current behaviour is what is wanted.