Export Version from JS Module (#963)

* Export PyScript version from js module

* Add docs and test
This commit is contained in:
Jeff Glass
2022-11-20 09:58:09 -06:00
committed by GitHub
parent 536f359fb9
commit cb05a9b067
3 changed files with 27 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import './styles/pyscript_base.css';
import { loadConfigFromElement } from './pyconfig';
import type { AppConfig } from './pyconfig';
import type { Runtime } from './runtime';
import { version } from './runtime';
import { PluginManager } from './plugin';
import { make_PyScript, initHandlers, mountElements } from './components/pyscript';
import { PyodideRuntime } from './pyodide';
@@ -261,4 +262,5 @@ globalExport('pyscript_get_config', pyscript_get_config);
const globalApp = new PyScriptApp();
globalApp.main();
export { version }
export const runtime = globalApp.runtime;