Table of Contents

Class NiteConfigFile

Namespace
Nite
Assembly
Nite.dll

Edits the dependency sections of nite.json in place. Only the section being changed is rewritten, so comments and formatting elsewhere in the file survive; comments inside that one section do not.

public static class NiteConfigFile
Inheritance
NiteConfigFile
Inherited Members

Fields

Dependencies

public const string Dependencies = "dependencies"

Field Value

string

DevDependencies

public const string DevDependencies = "devDependencies"

Field Value

string

Methods

RemoveDependency(string, string)

Removes name from whichever section has it. Returns the sections it was removed from.

public static IReadOnlyList<string> RemoveDependency(string projectDirectory, string name)

Parameters

projectDirectory string
name string

Returns

IReadOnlyList<string>

SetDependency(string, string, string, string)

Adds or updates name in section, creating the file if needed.

public static void SetDependency(string projectDirectory, string section, string name, string range)

Parameters

projectDirectory string
section string
name string
range string