Quick-Start Guide

Quickly scaffold a project with OmegaJS

Before we start

Omega documentation assumes prior knowledge of intermediate or above in javascript/typescript language, and knowledge about styling (CSS) and the Web API.

It is also recommended to learn about data structures and basic principles in web development before jumping into omega.

Creating a new Project

Using Templates

npx degit indivice/omega/ts <app-name>

The above command will copy the Typescript Template from omega's GitHub repository, which is pre-configured with a vite bundler and typescript. This is for the web platform

Using Vite

npm create vite@latest

Then you can use either vanilla javascript or vanilla typescript as your wish. After that, we need to install the OmegaJS package

npm i @indivice/omega

and we can start building applications for omega. To render your application using omega, we will use the render function provided by the omegajs library out of the box

import { RenderWeb } from '@indivice/omega/web'
import { Layout } from '@indivice/omega/components'

//app can be on separate App.ts files.
function App() {
    return Layout.Column({
        child: Content.Text("Hello World")
    })
}

//renderer
RenderWeb({
    selector: "#app" //query selector single element
    app: App
)}