create-eleva-app
Version:
Create Eleva apps with zero configuration
35 lines (29 loc) • 851 B
JavaScript
/**
* {{projectName}} - Main Application Entry
*
* This is the main entry point for your Eleva.js application.
* It initializes the app and mounts the root component.
*/
import Eleva from "eleva";
import App from "./components/App.js";
// Initialize Eleva application instance
const app = new Eleva("{{projectName}}");
// Register the App component
app.component("App", App);
// Mount with performance tracking
const startTime = performance.now();
// Mount the App component to the DOM
app
.mount(document.getElementById("app"), "App")
.then((instance) => {
// App successfully mounted
console.log(
`Application successfully mounted in ${
performance.now() - startTime
}ms! 💜 🚀`
);
})
.catch((error) => {
// Handle mount errors
console.error("Error mounting application:", error);
});