Appearance
marmotte / cli/features
cli/features
Interfaces
Feature
Defined in: src/cli/features/index.ts:24
A CLI feature that can be applied to an existing project.
Features mutate the in-memory pkg object (adding scripts and devDependencies) and may also write additional config files to dir. The caller is responsible for writing package.json back to disk after all features have run.
Properties
id
id:
string
Defined in: src/cli/features/index.ts:26
Unique identifier used as the CLI flag value (e.g. "lint", "format").
label
label:
string
Defined in: src/cli/features/index.ts:28
Human-readable label shown in the interactive prompt.
Methods
apply()
apply(
dir,pkg):Promise<void>
Defined in: src/cli/features/index.ts:34
Apply the feature to a project.
Parameters
dir
string
Absolute path to the project root.
pkg
In-memory package.json object to mutate.
Returns
Promise<void>
PackageJson
Defined in: src/cli/features/index.ts:7
Minimal package.json shape used by features when reading/writing project metadata.
Indexable
[key: string]: unknown
Properties
dependencies?
optionaldependencies:Record<string,string>
Defined in: src/cli/features/index.ts:12
description?
optionaldescription:string
Defined in: src/cli/features/index.ts:10
devDependencies?
optionaldevDependencies:Record<string,string>
Defined in: src/cli/features/index.ts:13
name
name:
string
Defined in: src/cli/features/index.ts:8
scripts?
optionalscripts:Record<string,string>
Defined in: src/cli/features/index.ts:11
version?
optionalversion:string
Defined in: src/cli/features/index.ts:9
Variables
features
constfeatures:Feature[]
Defined in: src/cli/features/index.ts:38
All built-in features available via marmotte create and marmotte setup.