Table of Contents

API reference

The public .NET surface of the Nite library, generated from the source on every documentation build.

Most applications use only a handful of these types. Start with the ones in the first table; the rest exist because the nite command-line tool is built on the same library, and they are public so you can script nite's pieces (the esbuild client, the package installer, the production builder) from your own tools.

Used by applications

Type What it is for
NiteExtensions AddNite, UseNite and MapNiteSpa: everything Program.cs needs. See ASP.NET Core integration.
NiteOptions and NiteMode Options for AddNite: force development or production mode, or point at a different project folder.
IslandTagHelper, NiteHeadTagHelper, NiteModuleTagHelper <island>, <nite-head> and <nite-module> for Razor views. See Tag helpers.
INiteAssets The URLs a page needs, in development or production. Use it to write your own tag helper or render nite's head into a non-Razor page.
NiteConfig The contents of nite.json, as loaded. See nite.json.

For tools and integrations

Namespace Contents
Nite.Esbuild A client for a long-lived esbuild --service process: transforms, builds and .NET plugins.
Nite.Packages The npm client: semver ranges, registry access, tarballs and the installer that writes nite.lock.json.
Nite.Build The production builder and its manifest.
Nite.Css The stylesheet pipeline: Sass, Less, Tailwind and PostCSS in front of esbuild.
Nite.Dev The development server behind /_nite.
Nite.Import Importing Vite and Create React App projects, and reading npm, Yarn, pnpm and Bun lockfiles.
Nite.Configuration Per-user directories, .npmrc parsing and layered settings.
Note

nite is pre-1.0. Types outside the first table may change between minor versions.