Get started with Vulmix

Pre-requisites

Before getting started with Vulmix, you need to make sure you have the following installed:

  • Node.js >= 20
  • A package manager - NPM, Bun or Yarn
  • A code editor of your choice
  • A terminal of your choice

Vulmix still doesn't support PNPM.

Installation

To scaffold a new Vulmix project, you can use the create-vulmix-app CLI tool:

# NPM
npx create-vulmix-app your-app-name

# Bun
bunx create-vulmix-app your-app-name

Once the install is complete, get into your project folder and install Vulmix dependencies:

cd your-app-name
# NPM
npm install

# Yarn
yarn install

# Bun
bun install

Running the project

Run the project locally by going into the project directory and then running the dev command:

# NPM
npm run dev

# Yarn
yarn dev

# Bun
bun dev

This should serve your project on an automatically picked port of localhost (default is 3000) with HMR enabled.

vulmix-port-3000

Then you should see the following page on your browser:

vulmix-starter-template

Now you can start building your application right away in the app.vue file by replacing the <VulmixWelcome /> component with your own content.

Preparing for production

To compile an optimized build, you need to run the build command:

# NPM
npm run build

# Yarn
yarn build

# Bun
bun build

This will minify and optimize your project code in the _dist folder which you can deploy its contents on any static host.

If you are hosting your project on Vercel, it will automatically generate a production build.

Testing your production build locally

If you want to test your project after running the build command, you can run the serve command to raise a server on the 8000 port:

# NPM
npm run serve

# Yarn
yarn serve

# Bun
bun serve

Then you can open you project at localhost:8000.

Your assets will be served with Gzip compression.