Rustelo/justfiles/base.just
Jesús Pérez 7cab57b645
Some checks failed
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Performance Benchmarks (push) Has been cancelled
CI/CD Pipeline / Cleanup (push) Has been cancelled
chore: update layout and files
2026-02-08 20:18:46 +00:00

89 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# =============================================================================
# BASE DEVELOPMENT COMMANDS - Rustelo Framework
# =============================================================================
# Core development commands for any Rustelo-based project
# Start development server with hot reload
dev:
@echo "🚀 Starting development server..."
cargo leptos watch
# Start development server with custom port
dev-port port="3030":
@echo "🚀 Starting development server on port {{port}}..."
LEPTOS_SITE_ADDR="127.0.0.1:{{port}}" cargo leptos watch
# Start development server with CSS watching
dev-full:
@echo "🚀 Starting full development environment..."
@just css-watch &
cargo leptos watch
# Watch CSS files for changes
css-watch:
@echo "👁️ Watching CSS files..."
@if [ -f "package.json" ]; then npm run watch:css; else echo "⚠️ No package.json found, skipping CSS watch"; fi
# Build CSS files
css-build:
@echo "🎨 Building CSS files..."
@if [ -f "package.json" ]; then npm run build:css; else echo "⚠️ No package.json found, skipping CSS build"; fi
# Setup project dependencies and tools
setup:
@echo "📦 Setting up project dependencies and tools..."
@if [ -f "package.json" ]; then echo "📦 Installing npm dependencies..." && npm install; else echo " No package.json found, skipping npm install"; fi
@echo "🦀 Installing cargo-leptos..."
cargo install cargo-leptos
# Install development dependencies
dev-deps:
@echo "📦 Installing development dependencies..."
@if [ -f "package.json" ]; then echo "📦 Installing npm dependencies..." && npm install; else echo " No package.json found, skipping npm install"; fi
@echo "🦀 Installing cargo-leptos..."
cargo install cargo-leptos
# =============================================================================
# BUILD COMMANDS
# =============================================================================
# Build project for development
build:
@echo "🔨 Building project..."
cargo leptos build
# Build project for production
build-prod:
@echo "🔨 Building for production..."
cargo leptos build --release
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
cargo clean
rm -rf pkg/
rm -rf dist/
# =============================================================================
# TEST COMMANDS
# =============================================================================
# Run all tests
test:
@echo "🧪 Running tests..."
cargo test
# Run tests with coverage
test-coverage:
@echo "🧪 Running tests with coverage..."
cargo tarpaulin --out Html
# Run end-to-end tests
test-e2e:
@echo "🧪 Running e2e tests..."
cd end2end && npm test
# Run tests in watch mode
test-watch:
@echo "🧪 Running tests in watch mode..."
cargo watch -x test