INNER CODE UNIT · Python

_repo_root

fluxerapp/flutter_client · tool/run_widget_preview_patched.py:49

def _repo_root() -> str:
    return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


def _patch_scaffold_index_html(scaffold_dir: str) -> None:
    index_path = os.path.join(scaffold_dir, "web", "index.html")
    if not os.path.isfile(index_path):
        return
    with open(index_path, encoding="utf-8") as handle:
        content = handle.read()
    if _PATCH_MARKER in content:
        return
    if _BOOTSTRAP_LINE not in content:
        print(
            f"[run_widget_preview_patched] Expected bootstrap script not found in {index_path}; "
            "skipping patch.",
            file=sys.stderr,
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…