Gulp plugin to execute the TypeDoc tool by Sebastian Lenz (https://sebastian-lenz.github.io/typedoc)
You do not need to install typedoc separately, just install gulp-typedoc:
npm install --save-dev gulp-typedoc
The plugin takes an object, of which all properties are passed transparently to the typedoc executable. Pipe in TypeScript files. The documentation files are not piped out, this is a future extension.
var typedoc = require("gulp-typedoc");
gulp.task("typedoc", function() {
return gulp
.src(["data/*.ts"])
.pipe(typedoc({
module: "commonjs",
out: "./out",
name: "my-project",
target: "es5",
includeDeclarations: true
}))
;
});
If you have very many files, you will run into a "command line too long" error, especially on Windows. This is because each filename gets put on the command line of a single typedoc command. In that case, it's easier to write a task that puts a directory into typedoc instead of separate files:
var child_process = require("child_process");
gulp.task("typedoc", function(cb) {
child_process.exec("typedoc --out ./doc --module commonjs --target es5 --name MyProject ./my_code_directory/", cb);
});
Allow specifying boolean arguments for typedoc; Replace module "gulp-clean" by "del"
Moved to typedoc version 0.2.x
Moved to typedoc version 0.1.x
Use require.resolve() to find typedoc more reliably
Allow any typedoc version 0.0.x
- Rogier Schouten rogier.schouten@gmail.com
- Daan Wissing d.wissing@spiritit.com
Apache-2.0