Skip to content

cli/create

Interfaces

CreateOptions

Defined in: venpm/src/cli/create.ts:9

Extends

Properties

config?
ts
optional config?: string;

Defined in: venpm/src/core/types.ts:191

Inherited from

GlobalOptions.config

css?
ts
optional css?: boolean;

Defined in: venpm/src/cli/create.ts:11

json?
ts
optional json?: boolean;

Defined in: venpm/src/core/types.ts:193

Inherited from

GlobalOptions.json

native?
ts
optional native?: boolean;

Defined in: venpm/src/cli/create.ts:12

tsx?
ts
optional tsx?: boolean;

Defined in: venpm/src/cli/create.ts:10

verbose?
ts
optional verbose?: boolean;

Defined in: venpm/src/core/types.ts:192

Inherited from

GlobalOptions.verbose

Functions

detectCreateMode()

ts
function detectCreateMode(fs, targetPath): Promise<"repo" | "plugin">;

Defined in: venpm/src/cli/create.ts:52

Walk up ancestor directories from targetPath looking for a venpm plugins.json. Returns "plugin" if found, "repo" otherwise.

Parameters

ParameterType
fsFileSystem
targetPathstring

Returns

Promise<"repo" | "plugin">


executeCreate()

ts
function executeCreate(
   ctx, 
   targetPath, 
options): Promise<void>;

Defined in: venpm/src/cli/create.ts:242

Parameters

ParameterType
ctxIOContext
targetPathstring
optionsCreateOptions

Returns

Promise<void>


findAncestorIndex()

ts
function findAncestorIndex(fs, startPath): Promise<
  | {
  data: Record<string, unknown>;
  path: string;
}
| null>;

Defined in: venpm/src/cli/create.ts:21

Walk up ancestor directories from startPath looking for a plugins.json whose $schema contains "venpm". Returns { path, data } if found, null otherwise.

Parameters

ParameterType
fsFileSystem
startPathstring

Returns

Promise< | { data: Record<string, unknown>; path: string; } | null>


registerCreateCommand()

ts
function registerCreateCommand(program): void;

Defined in: venpm/src/cli/create.ts:266

Parameters

ParameterType
programCommand

Returns

void