Skip to content

Type Aliases

CustomizableInitOptions

type CustomizableInitOptions = object

Defined in: index.ts:25

Type declaration

author
author: string
name
name: string

GitignoreFileInfo

type GitignoreFileInfo = IgnoreFileInfo

Defined in: index.ts:48


IgnoreFileInfo

type IgnoreFileInfo = object

Defined in: index.ts:44

Type declaration

path
path: string

InitFileResults

type InitFileResults = object

Defined in: index.ts:50

Type declaration

gitignore?
optional gitignore: IgnoreFileInfo;
manifest?
optional manifest: JSONFileInfo<NormalizedManifest>;
npmignore?
optional npmignore: IgnoreFileInfo;

InitOptions

type InitOptions = object

Defined in: index.ts:19

Type declaration

author?
optional author: string;
cwd?
optional cwd: string;
logger()?
optional logger: (...a) => void;
Parameters
a

unknown[]

Returns

void


JSONFileInfo<T>

type JSONFileInfo<T> = object

Defined in: index.ts:39

Type Parameters

T extends JSONObj = JSONObj

Type declaration

data
data: T
path
path: string

Functions

ensureGitignore()

function ensureGitignore(cwd): undefined | IgnoreFileInfo

Defined in: index.ts:64

Create or update a .gitignore file ensuring node_modules is listed. Returns { path } of the file that was written, or undefined if the file already contained the entry and no changes were needed.

Parameters

cwd

string

Returns

undefined | IgnoreFileInfo


ensureNpmignore()

function ensureNpmignore(cwd): undefined | IgnoreFileInfo

Defined in: index.ts:92

Create or update a .npmignore file ensuring vlt.json is listed. Returns { path } of the file that was written, or undefined if the file already contained the entry and no changes were needed.

Parameters

cwd

string

Returns

undefined | IgnoreFileInfo


getAuthorFromGitUser()

function getAuthorFromGitUser(user?): string

Defined in: get-author-from-git-user.ts:3

Parameters

user?

GitUser

Returns

string


init()

function init(__namedParameters): Promise<InitFileResults>

Defined in: index.ts:114

Parameters

__namedParameters

InitOptions = {}

Returns

Promise<InitFileResults>