Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

Npm

Helpers to run the npm tool.

Sample

1: 
2: 
3: 
4: 
Npm.install (fun o -> 
               { o with 
                   WorkingDirectory = "./src/FAKESimple.Web/"
               })

Nested types and modules

TypeDescription
InstallArgs

Arguments for the Npm install command

NpmCommand

The list of supported Npm commands.

NpmParams

The Npm parameter type

Functions and values

Function or valueDescription
Npm.defaultNpmParams
Signature: NpmParams

Npm default parameters

Npm.exec command setParams
Signature: command:string -> setParams:(NpmParams -> NpmParams) -> unit

Run npm <command>. Used to run any command.

Parameters

  • 'command' - command to run
  • 'setParams' - set command parameters

    Sample

    Npm.exec "--v" (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })

Npm.install(setParams)
Signature: setParams:(NpmParams -> NpmParams) -> unit

Run npm install

Parameters

  • 'setParams' - set command parameters

    Sample

    Npm.install (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })

Npm.installForced(setParams)
Signature: setParams:(NpmParams -> NpmParams) -> unit

Run npm install --force

Parameters

  • 'setParams' - set command parameters

    Sample

    Npm.installForced (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })

Npm.run command setParams
Signature: command:string -> setParams:(NpmParams -> NpmParams) -> unit

Run npm run <command>

Parameters

  • 'command' - command to run
  • 'setParams' - set command parameters

    Sample

    Npm.run "someCommand" (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })

Npm.runSilent command setParams
Signature: command:string -> setParams:(NpmParams -> NpmParams) -> unit

Run npm run --silent <command>. Suppresses npm error output. See npm:8821.

Parameters

  • 'command' - command to run
  • 'setParams' - set command parameters

    Sample

    Npm.runSilent "someCommand" (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })

Npm.runTest command setParams
Signature: command:string -> setParams:(NpmParams -> NpmParams) -> unit

Run npm run --silent <command>. Suppresses npm error output and will raise an FailedTestsException exception after the script execution instead of failing, useful for CI. See npm:8821.

Parameters

  • 'command' - command to run
  • 'setParams' - set command parameters

    Sample

    Npm.runTest "test" (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })

Npm.test(setParams)
Signature: setParams:(NpmParams -> NpmParams) -> unit

Run npm test --silent. Suppresses npm error output and will raise an FailedTestsException exception after the script execution instead of failing, useful for CI. See npm:8821.

Parameters

  • 'setParams' - set command parameters

    Sample

    Npm.test (fun o -> { o with WorkingDirectory = "./src/FAKESimple.Web/" })