typestrong / grunt-typedoc Goto Github PK
View Code? Open in Web Editor NEWGrunt plugin to generate TypeScript docs with TypeDoc
License: MIT License
Grunt plugin to generate TypeScript docs with TypeDoc
License: MIT License
It would be nice to be able to specify a custom TypeScript compiler binary, as seen here:
https://github.com/TypeStrong/grunt-ts#compiler
Because my project is not TS 1.6 ready, only TS 1.5
Please bump your typedoc dependency.
Thank you =)
Hi,
I have this configuration for the plugin
typedoc: {
build: {
options: {
module: 'commonjs',
out: './typedoc',
name: 'Riskpro Angular UI',
target: 'es5',
theme: 'default',
mode: 'file'
},
src: './client/app'
}
and when I run grunt doc
the execution ends with error The input line is too long.
I have seen there is a pull request for this issue but it does not pass.
I am currently using the version 0.2.4 on Window 7/64.
Any help is really appreciated, thanks 😉
Workaround: I use grunt-exec
to run the typedoc
command.
It looks like the grunt module depends on a fairly old version of TypeDoc; Can you bump the dependency?
NPM is telling me found 1 high severity vulnerability
and it looks to be coming through a chain of dependencies on grunt-typedoc
.
Here is the result of running npm audit
:
=== npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
High Prototype Pollution
Package handlebars
Patched in >=4.0.13
Dependency of grunt-typedoc [dev]
Path grunt-typedoc > typedoc > handlebars
More info https://npmjs.com/advisories/755
found 1 high severity vulnerability in 1710715 scanned packages
1 vulnerability requires manual review. See the full report for details.
So I did some digging in the package-lock.json of my project. Here is the chain:
"grunt-typedoc": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/grunt-typedoc/-/grunt-typedoc-0.2.4.tgz",
"integrity": "sha1-TjgqVObdnxqqK9fBhj0dJh28tj8=",
"dev": true,
"requires": {
"typedoc": "^0.4.1"
},
"dependencies": {
// abbreviated
"handlebars": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.5.tgz",
"integrity": "sha1-ksbta7FkEQxQ1NjQ+93HCAbG+Oc=",
"dev": true,
"requires": {
"async": "^1.4.0",
"optimist": "^0.6.1",
"source-map": "^0.4.4",
"uglify-js": "^2.6"
}
},
// abbreviated
I'll probably just switch to using grunt-run for this task but I thought I'd file a issue because it probably could be solved by changing your package.json to a newer version of typedoc.
typedoc 0.4.x only supports TypeScript 1.8. To support the newer TypeScript 2.1, we have to use typedoc 0.5.5 instead.
Is it possible to update grunt-typedoc to v0.2.2 ?
More, grunt-typedoc cannot manage options without values (like new includeDeclarations one).
Is i possible to update it ?
I want to specify --excludeExternals
to typedoc, so I'm doing this:
options: {
excludeExternals: ""
}
grunt-typedoc, in turn, passes two command-line arguments to typedoc's CLI:
"--excludeExternals"
"" (empty string)
This is because grunt-typedoc inserts all configuration options as pairs, even the ones that are merely flags and should not have an associated value.
https://github.com/TypeStrong/grunt-typedoc/blob/master/tasks/typedoc.js#L8-L13
When typedoc receives the empty string as a command-line argument, it interprets it as a path. This means that everything in my project, including the entire contents of node_modules
, is being scanned for .ts or .d.ts files. I don't want this, of course.
The fix is for grunt-typedoc to understand which command-line options should have a value (e.g. --outDir
) and which are merely flags (e.g. --excludeExternals
).
Alternatively, for any options that are set to true
, you can insert them without a value, and for any that are false
, you can omit them. This allows a gruntfile to have excludeExternals: true
.
Hi @vvakame,
FYI I just changed gulp-typedoc to use TypeDoc's API instead of starting it's command-line interface. Feel free to copy this.
Regards,
Rogier
grunt typedoc (using modified configuration from README.mk)
raises:
execvp(): No such file or directory
Fatal error: spawn ENOENT�
if we look at tasks/typedoc.js
- the executable looks fishy:
...
console.log('executable: ', executable);
...
printing:
/<path to>/MyProject/node_modules/grunt-typedoc/tasks/.bin/typedoc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.