Skip to content
Cake alias for executing Npx commands
Branch: master
Clone or download
semantic-release-bot chore(release): 1.3.0 [skip ci]
# [1.3.0](v1.2.0...v1.3.0) (2018-07-11)

### Features

* **cake:** upgrade Cake.Core to 0.28.0 ([55fd6b5](55fd6b5))
Latest commit 4bea6be Jul 12, 2018

README.md

Cake.Npx

appveyor nuget MIT License semantic-release

Cake alias for executing npx commands.

Installation

In your cake script add the following line (replacing version with the version you want to pin to)

#addin "nuget:https://api.nuget.org/v3/index.json?package=Cake.Npx&version=1.0.0"

Usage

// =============================================================
// Executes npx with the specified command.
// =============================================================
Npx("semantic-release");

// =============================================================
// Executes npx with the specified command and captures the
// standard output.
// =============================================================
string[] redirectedStandardOutput = null;
Npx("semantic-release", out redirectedStandardOutput);

// =============================================================
// Executes npx with the specified command and additional arguments.
// =============================================================
Npx("semantic-release", "--dry-run");
Npx("semantic-release", args => args.Append("--dry-run"));

// =============================================================
// Executes npx with the specified command and additional arguments
// and captures the standard output.
// =============================================================
string[] redirectedStandardOutput = null;

Npx("semantic-release",
    "--dry-run",
    out redirectedStandardOutput);

Npx("semantic-release",
    args => args.Append("--dry-run"),
    out redirectedStandardOutput);

// =============================================================
// Executes npx with the specified command and additional packages.
// ========================================
Npx("semantic-release",
    settings => settings.AddPackage("@semantic-release/git"));

// Executes npx with the specified command and additional packages
// and captures the standard output.
// =============================================================
string[] redirectedStandardOutput = null;

Npx("semantic-release",
    settings => settings.AddPackage("@semantic-release/git"),
    out redirectedStandardOutput);

// =============================================================
// Executes npx with the specified command, additional arguments
// and packages.
// =============================================================
Npx("semantic-release",
    "--dry-run",
    settings => settings.AddPackage("@semantic-release/git"));

Npx("semantic-release",
    args => args.Append("--dry-run"),
    settings => settings.AddPackage("@semantic-release/git"));

// =============================================================
// Executes npx with the specified command, additional arguments
// and packages and captures the standard output.
// =============================================================
string[] redirectedStandardOutput = null;

Npx("semantic-release",
    "--dry-run",
    settings => settings.AddPackage("@semantic-release/git"),
    out redirectedStandardOutput);

Npx("semantic-release",
    args => args.Append("--dry-run"),
    settings => settings.AddPackage("@semantic-release/git"),
    out redirectedStandardOutput);
You can’t perform that action at this time.