Skip to content

Commit

Permalink
Merge pull request #2741 from kant2002/patch-1
Browse files Browse the repository at this point in the history
Add npm ci support
  • Loading branch information
yazeedobaid authored Mar 16, 2023
2 parents c69914d + f0ca857 commit 13e3033
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/app/Fake.JavaScript.Npm/Npm.fs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module Npm =
| RunSilent of string
| RunTest of string
| Test
| CleanInstall
| Custom of string

/// The Npm parameter type
Expand Down Expand Up @@ -80,6 +81,7 @@ module Npm =
| RunTest str -> sprintf "run --silent %s" str
| Custom str -> str
| Test -> "test --silent"
| CleanInstall -> "ci"

/// Runs the given process and returns the process result.
let private execute npmParams command =
Expand Down Expand Up @@ -221,6 +223,22 @@ module Npm =
/// </example>
let test setParams = npm setParams Test

/// <summary>
/// Run <c>npm ci</c>.
/// </summary>
///
/// <param name="setParams">Set command parameters</param>
///
/// <example>
/// <code lang="fsharp">
/// Npm.cleanInstall (fun o ->
/// { o with
/// WorkingDirectory = "./src/FAKESimple.Web/"
/// })
/// </code>
/// </example>
let cleanInstall setParams = npm setParams CleanInstall

/// <summary>
/// Run <c>npm &lt;command&gt;</c>. Used to run any command.
/// </summary>
Expand Down

0 comments on commit 13e3033

Please sign in to comment.