Socket
Socket
Sign inDemoInstall

builder

Package Overview
Dependencies
5
Maintainers
5
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.1 to 2.2.2

4

HISTORY.md
History
=======
## 2.2.2
* Fix help to work with `builder help <action|archetype(s)>`.
## 2.2.1

@@ -5,0 +9,0 @@

29

lib/task.js

@@ -102,3 +102,4 @@ "use strict";

* ```sh
* $ builder help [ARCHETYPE, ARCHETYPE]
* $ builder help <action>
* $ builder help <archetype1> <archetype2>
* ```

@@ -110,21 +111,25 @@ *

Task.prototype.help = function (callback) {
// Arguments after `help` are archetypes.
// Arguments after `help` are action OR archetypes.
var cmd = this._command;
var flagsDisplay = chalk.green.bold("Flags");
// One matching command is an action: `builder help run`
var action = _.contains(this.ACTIONS, cmd) ? cmd : null;
var actionDisplay = action ? chalk.red(action) : "<action>";
var actions = this.ACTIONS.map(function (val) {
return val === cmd ? chalk.red(cmd) : val;
return val === action ? chalk.red(action) : val;
}).join(", ");
var action = cmd ? chalk.red(cmd) : "[action]";
var actionFlags = "";
if (cmd) {
actionFlags = "\n\n" + chalk.green.bold("Flags") + ": " + chalk.red(cmd) + "\n\n " +
args.help(cmd);
}
var actionFlags = action ?
"\n\n" + flagsDisplay + ": " + actionDisplay + "\n\n " + args.help(cmd) :
"";
// No matched action means all string are archetypes: `builder help <arch1> <arch2>`
var archetypes = action ? null : this._commands;
log.info("help",
"\n\n" + chalk.green.bold("Usage") + ": \n\n builder " + action + " <action> <task(s)>" +
"\n\n" + chalk.green.bold("Usage") + ": \n\n builder " + actionDisplay + " <task(s)>" +
"\n\n" + chalk.green.bold("Actions") + ": \n\n " + actions +
"\n\n" + chalk.green.bold("Flags") + ": General\n\n " + args.help() +
"\n\n" + flagsDisplay + ": General\n\n " + args.help() +
actionFlags +
"\n\n" + chalk.green.bold("Tasks") + ": \n" + this._config.displayScripts());
"\n\n" + chalk.green.bold("Tasks") + ": \n" + this._config.displayScripts(archetypes));

@@ -131,0 +136,0 @@ callback();

{
"name": "builder",
"version": "2.2.1",
"version": "2.2.2",
"description": "An NPM-based task runner",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc