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
projectDirectorystringconfigNiteConfig
Fields
BasePath
URL prefix for everything Nite serves, in development and production.
public const string BasePath = "/_nite"
Field Value
Properties
ClientRoot
public string ClientRoot { get; }
Property Value
Config
public NiteConfig Config { get; }
Property Value
CustomRendererPath
The configured custom renderer module, when Renderer is not "react".
public string? CustomRendererPath { get; }
Property Value
Directory
public string Directory { get; }
Property Value
IslandsDirectory
public string IslandsDirectory { get; }
Property Value
OutputDirectory
Where production builds go: wwwroot/_nite, so they publish as static web assets.
public string OutputDirectory { get; }
Property Value
UsesReactRenderer
public bool UsesReactRenderer { get; }
Property Value
WorkDirectory
Scratch space for pre-bundled dependencies and generated runtime files.
public string WorkDirectory { get; }
Property Value
Methods
FindIslands()
Island names (paths under the islands folder, without extension) mapped to their files.
public IReadOnlyDictionary<string, string> FindIslands()
Returns
IsInsideClientRoot(string)
public bool IsInsideClientRoot(string fullPath)
Parameters
fullPathstring
Returns
RelativeToClientRoot(string)
The client-root-relative URL path for a file, such as islands/Counter.tsx.
public string RelativeToClientRoot(string fullPath)
Parameters
fullPathstring
Returns
ResolveClientPath(string)
Resolves a client-relative path to a file inside the client root, or null.
public string? ResolveClientPath(string relativePath)
Parameters
relativePathstring