Installing Flitter

This guide will walk you through the process of installing Flitter in your project. Flitter can be used in various JavaScript environments, including pure JavaScript, React, and Svelte.

Prerequisites

  • Node.js (version 14 or later)
  • npm (usually comes with Node.js)

Installation Steps

For Pure JavaScript Projects

  1. Create a new directory for your project (if you haven’t already):

    mkdir my-flitter-project
    cd my-flitter-project
    
  2. Initialize a new npm project:

    npm init -y
    
  3. Install Flitter:

    npm install @meursyphus/flitter
    

For React Projects (using Vite)

  1. Create a new Vite project with React template:

    npm create vite@latest my-flitter-react-app -- --template react-ts
    cd my-flitter-react-app
    
  2. Install dependencies:

    npm install
    
  3. Install Flitter and its React bindings:

    npm install @meursyphus/flitter @meursyphus/flitter-react
    

For Svelte Projects (using SvelteKit)

  1. Create a new SvelteKit project:

    npm create svelte@latest my-flitter-svelte-app
    cd my-flitter-svelte-app
    
  2. Install dependencies:

    npm install
    
  3. Install Flitter and its Svelte bindings:

    npm install @meursyphus/flitter @meursyphus/flitter-svelte
    

Verifying the Installation

After installation, you can verify that Flitter is correctly installed by checking your package.json for the Flitter dependencies.

In the next section, we’ll guide you through creating your first Flitter app to ensure everything is set up correctly.