enablePreference() — astro Function Reference
Architecture documentation for the enablePreference() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 87981f14_0f96_683b_056a_ee60abb74e6d["enablePreference()"] f7d3fd10_bcd7_7c85_17b8_a4feb9026da8["index.ts"] 87981f14_0f96_683b_056a_ee60abb74e6d -->|defined in| f7d3fd10_bcd7_7c85_17b8_a4feb9026da8 4ec23106_e310_07dc_a9e9_e382aeb6a997["preferences()"] 4ec23106_e310_07dc_a9e9_e382aeb6a997 -->|calls| 87981f14_0f96_683b_056a_ee60abb74e6d style 87981f14_0f96_683b_056a_ee60abb74e6d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/cli/preferences/index.ts lines 178–189
async function enablePreference(
settings: AstroSettings,
key: PreferenceKey,
{ location }: SubcommandOptions,
) {
try {
await settings.preferences.set(key, true, { location });
console.log(msg.preferenceEnabled(key.replace('.enabled', '')));
return 0;
} catch {}
return 1;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does enablePreference() do?
enablePreference() is a function in the astro codebase, defined in packages/astro/src/cli/preferences/index.ts.
Where is enablePreference() defined?
enablePreference() is defined in packages/astro/src/cli/preferences/index.ts at line 178.
What calls enablePreference()?
enablePreference() is called by 1 function(s): preferences.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free