Skip to content

Latest commit

 

History

History
97 lines (75 loc) · 2.05 KB

File metadata and controls

97 lines (75 loc) · 2.05 KB

Contributing

Contributions are generally welcome. If you have any questions, suggestions or find a bug, feel free to file an issue.

Project Structure

# Benchmark utilities
benchmark/

# Compiled modules & bundles:
dist/
	es/ # Compiled ES modules & type definitions.

# Documentation source code:
docs/
	assets/    # rvx logo
	reference/ # API reference

# Source code for the examples:
examples/src/

# Scripts for development & publishing:
scripts/

# All the runtime source code:
src/
	async/   # Async utilities
	convert/ # Reactive conversion utilities
	core/    # The core module
	dom/     # rvx dom
	element/ # Web Component API (RvxElement)
	router/  # Routing API
	store/   # Store API (reactive wrappers)
	test/    # Test utilities

# Minimal templates for new projects:
templates/
	vite/     # Vite + TypeScript & JSX
	vite-ssg/ # Vite + TypeScript & JSX (Static site generation)

# Unit tests for the runtime:
tests/

Building Rvx

# Install dependencies:
npm ci

# Build & watch for changes:
npm start

# Build for production:
npm run build

Running Tests

# Build rvx & tests:
npm run build
# Or build & watch for changes:
npm start

# Run (already built) tests:
npm test

Building the Documentation

Building the docs also requires python and mkdocs-material

# Build examples:
npm run build --prefix examples

# Run & serve the docs locally:
docker compose -f mkdocs-compose.yml up

Running benchmarks

The benchmark setup runs a set of benchmarks from benchmark/src/benchmarks against one or more bundled snapshots of rvx in the same browsing context.

cd benchmark

# Install dependencies.
npm ci
npx playwright install

# Build & bundle a snapshot of the current source code:
# This creates a "base" snapshot or an "update" snapshot if base already exists.
node ./snapshot.js

# Run benchmarks against existing snapshots:
node ./run.js

# Run only benchmarks starting with "signals-":
node ./run.js --only signals-