@nestjs/cli
Version:
The Nest CLI: create NestJS applications, generate modules, controllers and CRUD resources, and build, run and watch projects and monorepos.
28 lines (27 loc) • 1.05 kB
TypeScript
export interface GlobSyncOptions {
/** A single glob pattern; every path matching it is removed from the result. */
ignore?: string;
/** When true, `*` and `**` also match entries whose name starts with a dot. */
dot?: boolean;
}
export interface GlobEntry {
/** Absolute path, always `/`-separated regardless of platform. */
path: string;
isFile: boolean;
isDirectory: boolean;
}
/**
* Splits a pattern into the literal prefix we can hand to `readdir` and the
* trailing segments that still need matching: `/src/a/*.hbs` -> `/src/a`.
*/
export declare function splitPattern(pattern: string): {
base: string;
rest: string[];
};
/**
* Expands `pattern` to every matching path, with the type of each entry.
* See the file header for the compatibility rules this preserves.
*/
export declare function globEntriesSync(pattern: string, options?: GlobSyncOptions): GlobEntry[];
/** Expands `pattern` to every matching path. */
export declare function globSync(pattern: string, options?: GlobSyncOptions): string[];