use bevy::prelude::*;
use bevy_scriptum::runtimes::javascript::prelude::*;
use bevy_scriptum::{BuildScriptingRuntime, prelude::*};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_scripting::<JsRuntime>(|_| {})
        .add_systems(Startup, startup)
        .run();
}

fn startup(mut commands: Commands, assets_server: Res<AssetServer>) {
    commands.spawn(Script::<JsScript>::new(
        assets_server.load("examples/js/entity_variable.js"),
    ));
}
