Cake.Npm

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

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

dotnet add package Cake.Npm --version 5.1.0

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

Aliases

Npm Install aliases

AddUser

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

BumpVersion

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.
NpmBumpVersion() Bump the version of the package.

Ci

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

Exec

NpmExec(NpmExecSettings) Runs an npm exec command with the specified settings.
NpmExec(string, Action<NpmExecSettings>) Runs an npm exec command using the settings returned by a configurator.
NpmExec(string, IEnumerable<string>) Runs an npm exec command.
NpmExec(string) Runs an npm exec command.

Install

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.
NpmInstall() Installs packages for the project in the current working directory.

Pack

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.
NpmPack() Creates a npm package from the current working directory. Package will be created in the current working directory.

Prune

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

Publish

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.
NpmPublish() Publishes the npm package in the current working directory.

Rebuild

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.
NpmRebuild() Rebuilds packages for the project in the current working directory.

Run-Script

NpmRunScript(NpmRunScriptSettings) Runs a npm script with the specified settings.
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.
NpmRunScript(string) Runs a npm script defined in the package.json from the current folder.

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(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.
NpmUpdate() Updates all packages for the project in the current working directory.

Version

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.
NpmVersion() Versions all packages for the project in the current working directory.
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.