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
1.2 KiB
1.2 KiB
JavaScript Template
A minimal JavaScript development template using Nix. Key features:
- Nix + Flakes for reproducible environments
- Bun (fast JavaScript runtime)
- Vite (development server & build tool)
- ESLint + Prettier (linting & formatting)
- Devshell commands via just
Prerequisites
Getting Started
Initialize a new project using omnix:
nix run nixpkgs#omnix -- \
init github:sajenim/javascript-template -o ./my-project
Then enter the development environment:
cd my-project
direnv allow # Or use: nix develop
just dev
NixOS users: If bun-installed binaries fail to find system libraries, enable FHS compatibility:
# nix/modules/devshell.nix
fhs = true;
Customization
This template provides minimal, sensible defaults. Customize as needed:
- Add dependencies:
just add <package> - Modify linting rules in
eslint.config.js - Add Prettier config via
.prettierrcif needed - Extend
Justfilewith project-specific commands