FAKE - F# Make


NpmHelper

Contains function to run npm tasks

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
defaultNpmParams
Signature: NpmParams

Npm default parameters

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

Runs npm with the given modification function. Make sure to have npm installed, you can install npm with nuget or a regular install. To change which Npm executable to use you can set the NpmFilePath parameter with the setParams function.

Parameters

  • setParams - Function used to overwrite the Npm default parameters.

Sample

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
   Target "Web" (fun _ ->
       Npm (fun p ->
              { p with
                  Command = Install Standard
                  WorkingDirectory = "./src/FAKESimple.Web/"
              })

       Npm (fun p ->
              { p with
                  Command = (Run "build")
                  WorkingDirectory = "./src/FAKESimple.Web/"
              })
   )
run npmParams
Signature: npmParams:NpmParams -> unit

Runs the given process and returns the process result.

Fork me on GitHub