vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • Reference
  • Type Aliases
  • CustomizableInitOptions
  • GitignoreFileInfo
  • IgnoreFileInfo
  • InitFileResults
  • InitOptions
  • JSONFileInfo<T>
  • Functions
  • ensureGitignore()
  • ensureNpmignore()
  • getAuthorFromGitUser()
  • init()
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/init
  6. /
  7. Reference

Reference

Type Aliases

CustomizableInitOptions

TypeScript
type CustomizableInitOptions = object;

Defined in: index.ts:25

Type declaration

NameType
authorstring
namestring

GitignoreFileInfo

TypeScript
type GitignoreFileInfo = IgnoreFileInfo;

Defined in: index.ts:48


IgnoreFileInfo

TypeScript
type IgnoreFileInfo = object;

Defined in: index.ts:44

Type declaration

NameType
pathstring

InitFileResults

TypeScript
type InitFileResults = object;

Defined in: index.ts:50

Type declaration

NameType
gitignore?IgnoreFileInfo
manifest?JSONFileInfo<NormalizedManifest>
npmignore?IgnoreFileInfo

InitOptions

TypeScript
type InitOptions = object;

Defined in: index.ts:19

Type declaration

NameType
author?string
cwd?string
logger?(...a) => void

JSONFileInfo<T>

TypeScript
type JSONFileInfo<T> = object;

Defined in: index.ts:39

Type Parameters

Type ParameterDefault type
T extends JSONObjJSONObj

Type declaration

NameType
dataT
pathstring

Functions

ensureGitignore()

TypeScript
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

ParameterType
cwdstring

Returns

undefined | IgnoreFileInfo


ensureNpmignore()

TypeScript
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

ParameterType
cwdstring

Returns

undefined | IgnoreFileInfo


getAuthorFromGitUser()

TypeScript
function getAuthorFromGitUser(user?): string

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

Parameters

ParameterType
user?GitUser

Returns

string


init()

TypeScript
function init(__namedParameters): Promise<InitFileResults>

Defined in: index.ts:114

Parameters

ParameterType
__namedParametersInitOptions

Returns

Promise<InitFileResults>


Previous@vltpkg/initNext@vltpkg/keychain

On this page

  • Type Aliases
  • CustomizableInitOptions
  • GitignoreFileInfo
  • IgnoreFileInfo
  • InitFileResults
  • InitOptions
  • JSONFileInfo<T>
  • Functions
  • ensureGitignore()
  • ensureNpmignore()
  • getAuthorFromGitUser()
  • init()

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now