from pathlib import Path
import subprocess
p=Path(__file__).parent/'theme-demo'
p.mkdir(exist_ok=True)
for name,content in {'.gitignore':'.env\nnode_modules/\n','.env':'SYNTHETIC=true\n','node_modules/pkg/index.js':'export const synthetic = true;\n','src/nested/example.ts':'export const value = 1;\n','README.md':'Theme evidence sample\n'}.items():
 f=p/name; f.parent.mkdir(parents=True,exist_ok=True); f.write_text(content)
subprocess.run(['git','init','-b','main',str(p)],check=True)
subprocess.run(['git','-C',str(p),'add','.'],check=True)
subprocess.run(['git','-C',str(p),'-c','user.name=Example','-c','user.email=example@example.com','commit','-m','Synthetic sample'],check=True)
(p/'src/nested/example.ts').write_text('export const value = 2;\n')
(p/'src/nested/other.ts').write_text('export const other = true;\n')
