Spaces:
Running
Running
Download detect.py from ShadowHunter222/qw: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/spaces/ShadowHunter222/qw/resolve/main/detect.py
- Command line
-
hf download hf://spaces/ShadowHunter222/qw/detect.py
-
curl -L -o detect.py https://huggingface.co/spaces/ShadowHunter222/qw/resolve/main/detect.py
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" | |