Spaces:
Sleeping
Sleeping
Patrick Rathje
commited on
Commit
·
5c94804
1
Parent(s):
b89b569
working prototype
Browse files
app.py
CHANGED
|
@@ -39,6 +39,10 @@ def build_project(code):
|
|
| 39 |
try:
|
| 40 |
yield loading_project_path, "Building project...",
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
process = subprocess.Popen(
|
| 43 |
"npm install && npm run build",
|
| 44 |
stdout=subprocess.PIPE,
|
|
|
|
| 39 |
try:
|
| 40 |
yield loading_project_path, "Building project...",
|
| 41 |
|
| 42 |
+
# write code to scene.ts
|
| 43 |
+
with open(os.path.join(tmp_dir, "src", "scenes", "example.tsx"), "w") as f:
|
| 44 |
+
f.write(code)
|
| 45 |
+
|
| 46 |
process = subprocess.Popen(
|
| 47 |
"npm install && npm run build",
|
| 48 |
stdout=subprocess.PIPE,
|