Skip to main content

detect_web_frontend

Function detect_web_frontend 

Source
pub fn detect_web_frontend(package_json: &str) -> Option<WebFrontend>
Expand description

Read the framework and language of a scaffolded frontend from its package.json text. None when the manifest cannot be parsed.

Framework markers are looked up in both dependencies and devDependencies — Vite’s Svelte starter compiles the framework away and declares it as a devDependency. typescript counts only in devDependencies. A manifest with no dependencies at all is Vanilla; one whose dependencies name none of the known frameworks is WebFramework::Other.