Cake.Npm

A set of aliases for Cake to help with running Npm (Node Package Manager) commands.

#addin nuget:?package=Cake.Npm&version=1.0.0

<package id="Cake.Npm" version="1.0.0" />

dotnet add package Cake.Npm --version 1.0.0

<PackageReference Include="Cake.Npm" Version="1.0.0" />

Aliases

Npm Version aliases. Use this to get the current npm version in use. For other functions of npm version, see:

AddUser

NpmAddUser(Action<NpmAddUserSettings>) Adds user using the settings returned by a configurator.
NpmAddUser(NpmAddUserSettings) Adds user using the specified settings.

BumpVersion

NpmBumpVersion() Bump the version of the package.
NpmBumpVersion(Action<NpmBumpVersionSettings>) Bump the version of the package using the settings returned by a configurator.
NpmBumpVersion(NpmBumpVersionSettings) Bump the version of the package using the specified settings.

Ci

NpmCi() Cis all packages for the project in the current working directory.
NpmCi(Action<NpmCiSettings>) Cis packages using the settings returned by a configurator.
NpmCi(NpmCiSettings) Cis packages using the specified settings.

Install

NpmInstall() Installs packages for the project in the current working directory.
NpmInstall(Action<NpmInstallSettings>) Installs packages using the settings returned by a configurator.
NpmInstall(NpmInstallSettings) Installs packages using the specified settings.
NpmInstall(string[]) Install one or more packages to the project in the current working directory.

Pack

NpmPack() Creates a npm package from the current working directory. Package will be created in the current working directory.
NpmPack(Action<NpmPackSettings>) Creates a npm package using the settings returned by a configurator.
NpmPack(NpmPackSettings) Creates a npm package using the specified settings. Package will be created in the current working directory.
NpmPack(string) Creates a npm package from a specific source. Package will be created in the current working directory.

Prune

NpmPrune() Runs npm prune from the current folder.
NpmPrune(Action<NpmPruneSettings>) Runs npm prune using the settings returned by a configurator.
NpmPrune(NpmPruneSettings) Runs npm prune with the specified settings.

Publish

NpmPublish() Publishes the npm package in the current working directory.
NpmPublish(Action<NpmPublishSettings>) Publishes a npm package using the settings returned by a configurator.
NpmPublish(NpmPublishSettings) Publishes a npm package based on the specified settings.
NpmPublish(string) Publishes the npm package created from a specific source.

Rebuild

NpmRebuild() Rebuilds packages for the project in the current working directory.
NpmRebuild(Action<NpmRebuildSettings>) Rebuild packages using the settings returned by a configurator.
NpmRebuild(NpmRebuildSettings) Rebuilds packages using the specified settings.
NpmRebuild(string[]) Rebuild one or more packages to the project in the current working directory.

Run-Script

NpmRunScript(NpmRunScriptSettings) Runs a npm script with the specified settings.
NpmRunScript(string) Runs a npm script defined in the package.json from the current folder.
NpmRunScript(string, Action<NpmRunScriptSettings>) Runs a npm script using the settings returned by a configurator.
NpmRunScript(string, IEnumerable<string>) Runs a npm script defined in the package.json from the current folder with specific arguments.

Set

NpmSet(Action<NpmSetSettings>) Sets an npm configuration setting returned by a configurator.
NpmSet(NpmSetSettings) Sets an npm configuration setting.
NpmSet(string, string, bool) Sets an npm configuration setting.

Update

NpmUpdate() Updates all packages for the project in the current working directory.
NpmUpdate(Action<NpmUpdateSettings>) Updates all packages for the project using the settings returned by a configurator.
NpmUpdate(NpmUpdateSettings) Updates all packages for the project using the specified settings.

Version

NpmVersion() Versions all packages for the project in the current working directory.
NpmVersion(Action<NpmVersionSettings>) Versions all packages for the project in the current working directory using the settings returned by a configurator.
NpmVersion(NpmVersionSettings) Versions all packages for the project in the current working directory using the specified settings.
NpmViewVersion(Action<NpmViewVersionSettings>) View the version of a package using the settings returned by a configurator.
NpmViewVersion(NpmViewVersionSettings) View the version of a package using the specified settings.
NpmViewVersion(string) View the version of a package.