npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vela-dsl

v0.1.0

Published

Modern Website Builder DSL - Compile declarative syntax to production-ready HTML, CSS, and JavaScript

Readme

Vela

Modern Website Builder DSL

Vela is a domain-specific language (DSL) for building modern, responsive websites using clean declarative syntax. Write simple, readable code and compile it to production-ready HTML, CSS, and JavaScript.

Features

  • 🎨 Beautiful Design - Modern, responsive layouts with customizable themes
  • Lightning Fast - Instant compilation with optimized output
  • 📝 Clean Syntax - Intuitive, readable code that's easy to learn
  • 🔧 Production Ready - Generates semantic HTML5, modern CSS, and minimal JavaScript
  • 🚀 Developer Friendly - Built-in dev server with hot reload
  • 📦 Zero Config - Sensible defaults, start building immediately

Installation

npm install -g vela

Or install locally in your project:

npm install vela

Quick Start

1. Create a new project

vela init my-website
cd my-website

2. Build your site

vela build

3. Start development server

vela dev

Open http://localhost:3000 in your browser!

Language Syntax

Basic Structure

site "My Website" {
  
  theme {
    primary "#6C5CE7"
    background "#0B1020"
    text "#EAF0FF"
  }

  page "/" {
    // Components go here
  }
}

Components

Hero Section

hero {
  title "Build websites with Vela"
  subtitle "Modern Website Builder DSL"
  button "Get Started" -> "/docs"
}

Section with Cards

section "Features" {
  
  card {
    title "Fast"
    text "Compile instantly"
  }

  card {
    title "Simple"
    text "Readable syntax"
  }
}

Footer

footer {
  text "© 2026 My Website"
}

CLI Commands

vela init <project-name>

Creates a new Vela project with the following structure:

my-website/
├── src/
│   └── main.vela       # Main Vela source file
├── dist/               # Compiled output (generated)
├── vela.config.json    # Configuration file
└── README.md

vela build

Compiles your Vela source files to HTML, CSS, and JavaScript:

  • dist/index.html - Semantic HTML5
  • dist/styles.css - Modern, responsive CSS
  • dist/app.js - Minimal JavaScript

vela dev

Starts a local development server with:

  • Live file watching
  • Automatic recompilation on changes
  • Hot reload support
  • Default port: 3000 (configurable with -p)
vela dev -p 8080

Configuration

Create a vela.config.json file in your project root:

{
  "src": "src",
  "dist": "dist",
  "entry": "main.vela"
}

Project Structure

vela/
├── src/
│   ├── cli/                    # Command-line interface
│   │   ├── cli.ts
│   │   └── commands/
│   │       ├── init.ts
│   │       ├── build.ts
│   │       └── dev.ts
│   ├── compiler/               # Compiler core
│   │   ├── compiler.ts
│   │   ├── parser.ts
│   │   ├── lexer.ts
│   │   └── ast.ts
│   ├── generator/              # Code generators
│   │   ├── html-generator.ts
│   │   ├── css-generator.ts
│   │   └── js-generator.ts
│   ├── std/                    # Standard library
│   │   ├── theme.ts
│   │   ├── hero.ts
│   │   ├── section.ts
│   │   ├── card.ts
│   │   ├── button.ts
│   │   └── footer.ts
│   └── utils/                  # Utilities
│       ├── file-utils.ts
│       ├── logger.ts
│       └── errors.ts
├── bin/
│   └── vela.js                 # CLI entry point
├── examples/
│   └── basic-site/
│       └── main.vela
├── package.json
├── tsconfig.json
└── README.md

Language Specification

Tokens

  • Keywords: site, theme, page, hero, section, card, button, footer, title, subtitle, text
  • Symbols: {, }, ->, "
  • Literals: String literals in double quotes
  • Comments: // for line comments, /* */ for block comments

Grammar

Site        → "site" STRING "{" Theme? Page+ "}"
Theme       → "theme" "{" Property+ "}"
Page        → "page" STRING "{" Component* "}"
Component   → Hero | Section | Card | Button | Footer
Hero        → "hero" "{" Property+ "}"
Section     → "section" STRING? "{" Component* "}"
Card        → "card" "{" Property+ "}"
Button      → "button" STRING ("->" STRING)?
Footer      → "footer" "{" Property+ "}"
Property    → IDENTIFIER STRING

Examples

Minimal Example

site "Hello World" {
  page "/" {
    hero {
      title "Hello, World!"
      subtitle "Welcome to Vela"
    }
  }
}

Full-Featured Example

See examples/basic-site/main.vela for a comprehensive example with:

  • Custom theme
  • Hero section with call-to-action
  • Multiple sections with cards
  • Footer

Development

Building from Source

git clone https://github.com/yourusername/vela.git
cd vela
npm install
npm run build

Running Locally

npm link
vela init test-site
cd test-site
vela build
vela dev

Architecture

Compilation Pipeline

  1. Lexer - Tokenizes source code
  2. Parser - Builds Abstract Syntax Tree (AST)
  3. Validator - Validates AST structure
  4. Generators - Generate HTML, CSS, and JavaScript
  5. Writer - Outputs files to dist/

Extensibility

Vela is designed for future extensibility:

  • Plugin System - Ready for custom components
  • Multiple Exports - Extensible to React, Vue, Next.js
  • AI Integration - Prepared for AI-powered generation
  • Icon Libraries - Ready for icon system integration

Roadmap

  • [ ] Component library expansion
  • [ ] Plugin system
  • [ ] React/Vue/Next.js exporters
  • [ ] Theme marketplace
  • [ ] Visual editor
  • [ ] AI-powered site generation
  • [ ] Database integration
  • [ ] Authentication modules
  • [ ] API integration

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

License

MIT License - see LICENSE file for details

Credits

Built with TypeScript, Node.js, and modern web technologies.


Made with ❤️ by the Vela team