
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
gulp-comments
Advanced tools
Exports all jsdocs-style comments from either .js
or .ts
files.
This is used as a workaround for when the TypeScript compiler strips jsdoc comments from its output. By extracting the comments first, you can run the output directly from .ts
files into jsdocs.
npm i gulp-comments --save-dev
The examples below illustrate usage in a gulp file. (Note that this plugin auto converts all file extentions to .js
for the benefit of jsdocs.)
Write the comments directly to files:
var gulp = require('gulp');
var comments = require('gulp-comments');
gulp.task('comments', function() {
return gulp.src('src/**/*.{ts,js}')
.pipe(comments())
.pipe(gulp.dest('lib/docs'));
});
Stream comments directly into gulp-jsdocs
:
var gulp = require('gulp');
var comments = require('gulp-comments');
var jsdoc = require('gulp-jsdoc');
gulp.task('docs', function(done) {
gulp.src('/src/**/*.{ts,js}')
.pipe(comments())
.pipe(jsdoc('docs.json', done));
});
An optional filter parameter can be added when calling comments()
. Any jsdoc block containing this string will be excluded from publishing. Can be useful for creating custom documentation builds.
//...
.pipe(comments('@internal'))
// ...
Multiple Filters
//...
.pipe(comments('@internal,@justforme'))
// ...
FAQs
Exports all jsdocs-style comments from either .js or .ts files
The npm package gulp-comments receives a total of 21 weekly downloads. As such, gulp-comments popularity was classified as not popular.
We found that gulp-comments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.