New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-help-doc

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-help-doc - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

55

index.js

@@ -20,2 +20,7 @@ /**

/**
* @external Gulp
* @see {@link https://github.com/gulpjs/gulp/blob/master/docs/API.md}
*/
/**
* Gulpfile reflection metadata

@@ -54,7 +59,42 @@ *

/**
* @external Gulp
* @see {@link https://github.com/gulpjs/gulp/blob/master/docs/API.md}
*/
function rdeps(nodes) {
var deps = [];
if (!nodes.length) return deps;
nodes.forEach(function(node) {
if (!node.branch) {
deps.push(node.label);
}
deps = deps.concat(rdeps(node.nodes));
});
return deps.reduce(function(p, c) {
if (p.indexOf(c) < 0) p.push(c);
return p;
}, []);
}
function gulpTasks(gulp) {
if (!gulp.tree) {
// old gulp
return gulp.tasks;
}
// v4
var nodes = gulp.tree({ deep: true }).nodes;
var tasks = {};
nodes.forEach(function(node) {
tasks[node.label] = {
name: node.label,
dep: rdeps(node.nodes)
};
});
return tasks;
}
/**

@@ -77,8 +117,9 @@ * Analyzes given gulp instance and build internal cache

var jsDoc = source.match(globalRxDoc);
var tasks = gulpTasks(gulp);
Object.keys(gulp.tasks).forEach(function (task) {
Object.keys(tasks).forEach(function (task) {
reflection[task] = {
name: gulp.tasks[task].name,
name: tasks[task].name,
desc: '',
dep: gulp.tasks[task].dep
dep: tasks[task].dep
};

@@ -85,0 +126,0 @@ });

2

package.json
{
"name": "gulp-help-doc",
"version": "1.0.4",
"version": "1.0.5",
"description": "Gulp available tasks usage information based on jsdoc-like notations",

@@ -5,0 +5,0 @@ "main": "index.js",

# gulp-help-doc
[![Build Status](https://travis-ci.org/Mikhus/gulp-help-doc.svg?branch=master)](https://travis-ci.org/Mikhus/gulp-help-doc)
[![Build Status](https://travis-ci.org/Mikhus/gulp-help-doc.svg?branch=master)](https://travis-ci.org/Mikhus/gulp-help-doc) [![NPM License](https://img.shields.io/npm/l/gulp-help-doc.svg)](https://raw.githubusercontent.com/Mikhus/gulp-help-doc/master/LICENSE)

@@ -4,0 +4,0 @@ Self-documented gulp tasks with pretty printable usage information in command-line.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc