Table of Contents

Class ProjectImporter

Namespace
Nite.Import
Assembly
Nite.dll

Turns an existing npm/yarn/pnpm/bun web project (Vite, or Create React App) into the client half of a Nite project. Analyze(string) only reads and produces a plan, so --dry-run is free; Apply(ImportPlan, string) copies files into a new project. The source is never modified.

public static class ProjectImporter
Inheritance
ProjectImporter
Inherited Members

Fields

CreateReactApp

public const string CreateReactApp = "create-react-app"

Field Value

string

Static

public const string Static = "static"

Field Value

string

Vite

public const string Vite = "vite"

Field Value

string

Methods

Analyze(string)

public static ImportPlan Analyze(string source)

Parameters

source string

Returns

ImportPlan

Apply(ImportPlan, string)

Writes the plan's files into a project directory, never overwriting. Returns the paths written.

public static List<string> Apply(ImportPlan plan, string projectDirectory)

Parameters

plan ImportPlan
projectDirectory string

Returns

List<string>