qw / detect.py
ShadowHunter222's picture
Upload 6 files
6a5535a verified
Raw History Blame Contribute Delete
409 Bytes
"""Project detector - see app.py detect_type for prod. This module for unit tests."""
from pathlib import Path
def detect_type(src: Path) -> str:
if (src/"pubspec.yaml").exists(): return "flutter"
if (src/"capacitor.config.json").exists(): return "hybrid-capacitor"
if list(src.rglob("app/build.gradle")): return "native"
if (src/"index.html").exists(): return "pure-web"
return "unknown"