File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,8 @@ Generates TypeScript definitions from annotated JavaScript files.
395
395
396
396
-o, --out Saves to a file instead of writing to stdout.
397
397
398
+ --no-comments Does not output any JSDoc comments.
399
+
398
400
usage: pbts [options] file1.js file2.js ...
399
401
```
400
402
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ exports.main = function(args, callback) {
24
24
name : "n" ,
25
25
out : "o"
26
26
} ,
27
- string : [ "name" , "out" ]
27
+ string : [ "name" , "out" ] ,
28
+ boolean : [ "comments" ] ,
29
+ default : {
30
+ comments : true
31
+ }
28
32
} ) ;
29
33
30
34
var files = argv . _ ;
@@ -42,6 +46,8 @@ exports.main = function(args, callback) {
42
46
"" ,
43
47
" -o, --out Saves to a file instead of writing to stdout." ,
44
48
"" ,
49
+ " --no-comments Does not output any JSDoc comments." ,
50
+ "" ,
45
51
"usage: " + chalk . bold . green ( "pbts" ) + " [options] file1.js file2.js ..."
46
52
] . join ( "\n" ) ) ;
47
53
if ( callback )
@@ -62,7 +68,7 @@ exports.main = function(args, callback) {
62
68
// There is no proper API for jsdoc, so this executes the CLI and pipes the output
63
69
var basedir = path . join ( __dirname , ".." ) ;
64
70
var moduleName = argv . name || "null" ;
65
- var child = child_process . exec ( "node \"" + basedir + "/node_modules/jsdoc/jsdoc.js\" -c \"" + basedir + "/jsdoc.types.json\" -q \"module=" + encodeURIComponent ( moduleName ) + "\" " + files . map ( function ( file ) { return '"' + file + '"' ; } ) . join ( ' ' ) , {
71
+ var child = child_process . exec ( "node \"" + basedir + "/node_modules/jsdoc/jsdoc.js\" -c \"" + basedir + "/jsdoc.types.json\" -q \"module=" + encodeURIComponent ( moduleName ) + "&comments=" + Boolean ( argv . comments ) + " \" " + files . map ( function ( file ) { return '"' + file + '"' ; } ) . join ( ' ' ) , {
66
72
cwd : process . cwd ( ) ,
67
73
argv0 : "node" ,
68
74
stdio : "pipe" ,
You can’t perform that action at this time.
0 commit comments