You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more examples, please take a look at the [examples folder](examples).
60
80
61
-
Currently there are two renderers:
81
+
Currently there are three renderers:
62
82
63
83
*[PysideRenderer](collagraph/renderers/pyside_renderer.py): for rendering PySide6 applications
64
84
*[PygfxRenderer](collagraph/renderers/pygfx_renderer.py): for rendering 3D graphic scenes with [Pygfx](https://github.com/pygfx/pygfx)
85
+
*[DomRenderer](collagraph/renderers/dom_renderer.py): for rendering to browser DOM through [PyScript](https://pyscript.net) (or rather [Pyodide](https://pyodide.org/en/stable/))
65
86
66
-
It is possible to create a custom Renderer using the [Renderer](collagraph/renderers/__init__.py) interface, to render to other UI frameworks, for instance wxPython, or even the browser DOM.
87
+
It is possible to create a custom Renderer using the [Renderer](collagraph/renderers/__init__.py) interface, to render to other UI frameworks, for instance wxPython.
67
88
68
89
69
90
## Development
@@ -82,3 +103,17 @@ poetry run pytest
82
103
# Install git pre-commit hooks to make sure tests/linting passes before committing
83
104
poetry run pre-commit install
84
105
```
106
+
107
+
108
+
### Syntax Highlighting
109
+
110
+
Syntax highlighting for single-file components (`.cgx`) is supported for VSCode and Sublime Text:
111
+
112
+
*[CGX syntax highlight for Sublime Text](https://github.com/fork-tongue/cgx-syntax-highlight-sublime)
113
+
*[CGX syntax highlight for VSCode](https://github.com/fork-tongue/cgx-syntax-highlight-vscode)
114
+
115
+
116
+
### Formatting and linting
117
+
118
+
Linting cgx files is possible with a flake8 plugin: [flake8-cgx](https://github.com/fork-tongue/flake8-cgx).
119
+
Formatting the contents of the script tag can be done with [black-cgx](https://github.com/fork-tongue/black-cgx).
0 commit comments