Typedoc: #FeatureRequest Support Watch mode

Created on 3 Feb 2017  路  4Comments  路  Source: TypeStrong/typedoc

When working on a complex codebase, it would be useful to have a watch mode, so you would be able to see changes faster.

enhancement

Most helpful comment

It isn't exactly the same, but a (builtin) watch mode without incremental builds kind of defeats the gains from it being built in. TypeDoc will always take at least ~4 seconds to build even a one file project because that's the overhead from starting the TypeScript compiler. In practice, it will probably take longer... while it could be built in, I'm not convinced it is worth the extra complexity until there is a speed benefit to having this built in.

It's easy to use onchange to do this yourself,

onchange 'src/**/*.ts' -- npx typedoc --out docs/ src/

All 4 comments

Duplicate of #207

I don't think this is the same as Incremental build. Supporting a watch mode could still do a full build each time. The benefit would be increasing developer productivity while developing docs

It isn't exactly the same, but a (builtin) watch mode without incremental builds kind of defeats the gains from it being built in. TypeDoc will always take at least ~4 seconds to build even a one file project because that's the overhead from starting the TypeScript compiler. In practice, it will probably take longer... while it could be built in, I'm not convinced it is worth the extra complexity until there is a speed benefit to having this built in.

It's easy to use onchange to do this yourself,

onchange 'src/**/*.ts' -- npx typedoc --out docs/ src/

What on earth was I thinking? Watch and incremental are very different things. Incremental support is very different from watch. Yeah, watch is way better with incremental support... but the compiler supports incremental builds, so the only full rebuild each time is what TypeDoc does. This can still be significant time savings on large TS projects.

https://github.com/TypeStrong/typedoc/pull/1482 adds support for watch.

Was this page helpful?
0 / 5 - 0 ratings