Introduction Last updated: 09-30-2021
Exalt is a JavaScript framework for developing websites, web apps and component libraries. Exalt prioritizes bundle size and cross framework compatibilty by making use of Web Components. As a result of using web components, you can use Exalt components with your favorite libraries and frameworks without being restricted to a specific tech stack.
What is Exalt?
Exalt is a JavaScript framework built as a minimal layer on top of web standards. This was done in order to provide a great developer experience without bloating your app bundles with framework code. Unlike other major frameworks that immediately bloat your bundles, Exalt is ~2kb minified + gzipped.
One of key benefits to using web standards is not only smaller bundle sizes but there is less to learn in order to get a project up and running. Exalt can be used to develop websites, web apps and component libraries. Component libraries powered by the Exalt runtime are able to be used in any other framework thanks to the capabilities provided by Web Components.
Key features of Exalt include:
- Component API with built in encapsulation
- Standards based declarative templates
- Store API for cross component state management
- Developer tools to streamline the development process
- Painless prerendering via @exalt/toolchain
Notice
Exalt uses web standards that are not available in outdated browsers such IE 11 and older. The @exalt/toolchain provides a "legacy" option to support older browsers. However we do not provide official support for browsers that dont support the Web Component spec.
Installation
Exalt is easy to get up and running. First install the Exalt CLI globaly. This will give you access to the exalt commands to help you create and develop your project. To install the Exalt CLI, run the following command: npm install -g @exalt/cli
When the Exalt CLI is used outside a project folder, it can only generate projects but when used inside a project folder, it can load the specified toolchain and power the development commands. This allows the CLI to be used regardless of build requirements. If the default toolchain does not fit your needs you can create your own.
If you are using VSCode, you can get a better development experience by using the Exalt VSCode Extension. This extension provides support for syntax highlighting, auto completion, and intellisense for Exalt templates.
Getting Started
Create a new project
You can create a new project by running the create command and supplying the project name. This will generate your new project, install the required dependencies, and initialize a new git repository. By default @exalt/toolchain is used to power your projects build pipeline. This can be changed using the toolchain option in your exalt.json file.
exalt create
Run the application
While using the default toolchain, the dev command will launch a web server, watch your files, and build the app as you make changes. As soon as the initial build is complete it will open your app in your default web browser. Any builds after this will refresh the page.
cd&& exalt dev