mirror of
https://github.com/sajenim/javascript-template.git
synced 2025-12-16 19:40:39 +08:00
Features: - Nix + Flakes for reproducible environments - Bun (fast JavaScript runtime) - Vite (development server & build tool) - ESLint + Prettier (linting & formatting) - Devshell commands via just - Modular structure using flake-parts - Omnix template support for initialization
58 lines
925 B
Makefile
58 lines
925 B
Makefile
# List available commands
|
|
default:
|
|
@just --list
|
|
|
|
# Start development server with hot reload
|
|
dev:
|
|
bun run dev
|
|
|
|
# Add a package dependency
|
|
add package:
|
|
bun add {{package}}
|
|
|
|
# Add a dev dependency
|
|
add-dev package:
|
|
bun add -d {{package}}
|
|
|
|
# Remove a package dependency
|
|
remove package:
|
|
bun remove {{package}}
|
|
|
|
# Build for production
|
|
build:
|
|
bun run build
|
|
|
|
# Preview production build
|
|
preview:
|
|
bun run preview
|
|
|
|
# Install dependencies
|
|
install:
|
|
bun install
|
|
|
|
# Update flake inputs
|
|
update:
|
|
nix flake update
|
|
|
|
# Clean build artifacts and dependencies
|
|
clean:
|
|
rm -rf dist node_modules bun.lockb
|
|
|
|
# Format code with prettierd
|
|
format:
|
|
prettierd --write .
|
|
|
|
# Check formatting without making changes
|
|
format-check:
|
|
prettierd --check .
|
|
|
|
# Lint code with eslint
|
|
lint:
|
|
eslint .
|
|
|
|
# Lint and auto-fix issues
|
|
lint-fix:
|
|
eslint --fix .
|
|
|
|
# Check both formatting and linting
|
|
check: format-check lint
|