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
-
Create a new directory for your project (if you haven’t already):
mkdir my-flitter-project cd my-flitter-project
-
Initialize a new npm project:
npm init -y
-
Install Flitter:
npm install @meursyphus/flitter
For React Projects (using Vite)
-
Create a new Vite project with React template:
npm create vite@latest my-flitter-react-app -- --template react-ts cd my-flitter-react-app
-
Install dependencies:
npm install
-
Install Flitter and its React bindings:
npm install @meursyphus/flitter @meursyphus/flitter-react
For Svelte Projects (using SvelteKit)
-
Create a new SvelteKit project:
npm create svelte@latest my-flitter-svelte-app cd my-flitter-svelte-app
-
Install dependencies:
npm install
-
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.