statigen
Version:
A static site generator that supports html, ejs, and markdown source files
26 lines (25 loc) • 923 B
TypeScript
import type { TextFile } from './files/TextFile';
export declare class Tree {
name: string;
path: string;
private _title?;
file?: TextFile;
children: Tree[];
constructor(name: string, path: string, _title?: string, file?: TextFile, children?: Tree[]);
get hasChildren(): boolean;
add(path: string, file?: TextFile): void;
/**
* Sort the tree recursively. Leafs are sorted to the top and then alphabetized, then branches are alphatized next (at the bottom)
*/
sort(): this;
/**
* Given a node, find its priority. If the node doesn't have a priority, look through its direct children for a `parentPriority` attribute
*/
private getPriority;
/**
* Given a node, find its priority. If the node doesn't have a priority, look through its direct children for a `parentPriority` attribute
*/
get title(): any;
}
export declare enum SortMode {
}