Table of Contents

Class NiteProject

Namespace
Nite
Assembly
Nite.dll

A project directory with its nite.json and the absolute paths derived from it.

public sealed class NiteProject
Inheritance
NiteProject
Inherited Members

Constructors

NiteProject(string, NiteConfig?)

public NiteProject(string projectDirectory, NiteConfig? config = null)

Parameters

projectDirectory string
config NiteConfig

Fields

BasePath

URL prefix for everything Nite serves, in development and production.

public const string BasePath = "/_nite"

Field Value

string

Properties

ClientRoot

public string ClientRoot { get; }

Property Value

string

Config

public NiteConfig Config { get; }

Property Value

NiteConfig

CustomRendererPath

The configured custom renderer module, when Renderer is not "react".

public string? CustomRendererPath { get; }

Property Value

string

Directory

public string Directory { get; }

Property Value

string

IslandsDirectory

public string IslandsDirectory { get; }

Property Value

string

OutputDirectory

Where production builds go: wwwroot/_nite, so they publish as static web assets.

public string OutputDirectory { get; }

Property Value

string

UsesReactRenderer

public bool UsesReactRenderer { get; }

Property Value

bool

WorkDirectory

Scratch space for pre-bundled dependencies and generated runtime files.

public string WorkDirectory { get; }

Property Value

string

Methods

FindIslands()

Island names (paths under the islands folder, without extension) mapped to their files.

public IReadOnlyDictionary<string, string> FindIslands()

Returns

IReadOnlyDictionary<string, string>

IsInsideClientRoot(string)

public bool IsInsideClientRoot(string fullPath)

Parameters

fullPath string

Returns

bool

RelativeToClientRoot(string)

The client-root-relative URL path for a file, such as islands/Counter.tsx.

public string RelativeToClientRoot(string fullPath)

Parameters

fullPath string

Returns

string

ResolveClientPath(string)

Resolves a client-relative path to a file inside the client root, or null.

public string? ResolveClientPath(string relativePath)

Parameters

relativePath string

Returns

string