Initial commit - some junk
This commit is contained in:
commit
316c090778
9 files changed
+2272
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Simple test to debug Ritz framework
|
||||
"""
|
||||
|
||||
from framework import (
|
||||
component, signal,
|
||||
Main, Div, P, Button, H1
|
||||
)
|
||||
|
||||
@component
|
||||
def SimpleTest():
|
||||
"""Simplest possible test"""
|
||||
with Main():
|
||||
yield P('Hello World')
|
||||
|
||||
# Test it
|
||||
import json
|
||||
|
||||
result = SimpleTest()
|
||||
print("Result type:", type(result))
|
||||
print("Result:", result)
|
||||
|
||||
if result:
|
||||
print("\n=== HTML ===")
|
||||
print(result.to_html())
|
||||
print("\n=== IR ===")
|
||||
print(json.dumps(result.to_ir(), indent=2))
|
||||
Reference in new issue
Block a user