en-US/about_Whiskey_NpmConfig_Task.help.txt

TOPIC
    about_Whiskey_NpmConfig_Task
 
     
SUMMARY
    Runs the `npm config` command to set global-level, user-level, or project-level NPM configuration.
 
 
DESCRIPTION
    The `NpmConfig` task runs the `npm config` command to set NPM configuration. By default, it sets configuration at the project level (i.e. in a .npmrc file in the current directory). To set the configuration at the user-level, set the `Scope` property to `User`. To set the configuration globally, set the `Scope` property to `Global`.
 
    Set the `Configuration` property to key/value pairs. The keys should be the name of the configuration setting; the value should be its value. For example,
 
        Build:
        - NpmConfig:
            Configuration:
                registry: https://registry.npmjs.org
                email: buildmaster@example.com
      
 
PROPERTIES
 
    * `Configuration` (*mandatory*): the key/value pairs to set.
    * `Scope`: the level at which the configuration is set. By default (i.e. if this property is missing), the configuration is set at the project level, in an .npmrc file in the current directory. Allowed value are `Project`, `User`, or `Global` to set the configuration in the project, user, or global NPM configuration files, respectively.
    * `WorkingDirectory`: the directory in which to run the `npm config` command. The default is the directory of your whiskey.yml file.
 
 
EXAMPLES
 
    ## Example 1
 
        Build:
        - NpmConfig:
            Configuration:
                registry: https://registry.npmjs.org
                email: buildmaster@example.com
 
    Will create a .npmrc file in the current directory that looks like this:
 
        registry=https://registry.npmjs.org
        email=buildmaster@example.com
         
    ## Example 2
 
        Build:
        - NpmConfig:
            Configuration:
                registry: https://registry.npmjs.org
                email: buildmaster@example.com
            Scope: User
 
    Will create a .npmrc file in the user's home directory that looks like this (assuming the user's .npmrc file doesn't exist):
 
        registry=https://registry.npmjs.org
        email=buildmaster@example.com