mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
* minor changes to make linting happy * remove cast since linter wasn't happy * address PR comments
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
import App from './App.svelte';
|
|
import './styles/pyscript_base.css';
|
|
|
|
import { PyScript } from './components/pyscript';
|
|
import { PyRepl } from './components/pyrepl';
|
|
import { PyEnv } from './components/pyenv';
|
|
import { PyBox } from './components/pybox';
|
|
import { PyButton } from './components/pybutton';
|
|
import { PyTitle } from './components/pytitle';
|
|
import { PyInputBox } from './components/pyinputbox';
|
|
import { PyWidget } from './components/base';
|
|
import { PyLoader } from './components/pyloader';
|
|
import { globalLoader } from './stores';
|
|
import { PyConfig } from './components/pyconfig';
|
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
const xPyScript = customElements.define('py-script', PyScript);
|
|
const xPyRepl = customElements.define('py-repl', PyRepl);
|
|
const xPyEnv = customElements.define('py-env', PyEnv);
|
|
const xPyBox = customElements.define('py-box', PyBox);
|
|
const xPyButton = customElements.define('py-button', PyButton);
|
|
const xPyTitle = customElements.define('py-title', PyTitle);
|
|
const xPyInputBox = customElements.define('py-inputbox', PyInputBox);
|
|
const xPyWidget = customElements.define('py-register-widget', PyWidget);
|
|
const xPyLoader = customElements.define('py-loader', PyLoader);
|
|
const xPyConfig = customElements.define('py-config', PyConfig);
|
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
|
|
// As first thing, loop for application configs
|
|
const config: PyConfig = document.querySelector('py-config');
|
|
if (!config) {
|
|
const loader = document.createElement('py-config');
|
|
document.body.append(loader);
|
|
}
|
|
|
|
// add loader to the page body
|
|
const loader = <PyLoader>document.createElement('py-loader');
|
|
document.body.append(loader);
|
|
globalLoader.set(loader);
|
|
|
|
const app = new App({
|
|
target: document.body,
|
|
});
|
|
|
|
export default app;
|