@charlontank/create-lamdera-app
v1.3.0
Published
A modern CLI tool to scaffold Lamdera applications with Tailwind CSS, i18n, dark mode, and testing support
Downloads
9
Maintainers
Readme
create-lamdera-app
A modern CLI tool to scaffold Lamdera applications with built-in support for Tailwind CSS, internationalization (i18n), dark mode, and testing.
Features
- 🚀 Quick Setup - Get a working Lamdera app in seconds
- 🎨 Tailwind CSS - Beautiful, responsive designs out of the box
- 🌍 i18n Support - Built-in internationalization (EN/FR) with easy extension
- 🌓 Dark Mode - System-aware dark/light theme switching
- 🧪 Testing Ready - lamdera-program-test integration for reliable tests
- 📝 Editor Support - Cursor editor integration with custom rules
- 🔧 Dev Tools - Hot reload, debugger toggle, and more
- ⚡ Bun Support - Use Bun for 10x faster package installs
Installation
npm install -g @CharlonTank/create-lamdera-appUsage
Create a new project
create-lamdera-appFollow the interactive prompts to configure your project.
Non-interactive mode
create-lamdera-app --name my-app --tailwind --i18n --testAdd to existing project
cd existing-lamdera-project
create-lamdera-app --initOptions
--name <project-name>- Project name (required in non-interactive mode)--cursor <yes|no>- Add Cursor editor support--tailwind- Add Tailwind CSS--test- Add lamdera-program-test for testing--i18n- Add internationalization and dark mode--github <yes|no>- Create GitHub repository--public/--private- Repository visibility (with --github)--init- Add features to existing project--package-manager <npm|bun>- Choose package manager (default: npm)--pm <npm|bun>- Shorthand for --package-manager--bun- Use Bun package manager (same as --pm bun)--skip-install- Skip package installation
Shortcuts
--no-cursor- Same as--cursor no--no-github- Same as--github no--no-test- Same as--test no
Project Structure
my-app/
├── src/
│ ├── Backend.elm
│ ├── Frontend.elm
│ ├── Types.elm
│ ├── Env.elm
│ └── (optional features)
│ ├── I18n.elm # with --i18n
│ ├── Theme.elm # with --i18n
│ ├── LocalStorage.elm # with --i18n
│ └── styles.css # with --tailwind
├── tests/ # with --test
│ └── Tests.elm
├── public/
│ └── sample.svg
├── elm.json
├── lamdera-dev-watch.sh
├── toggle-debugger.py
├── head.html
└── (optional files)
├── package.json # with --tailwind
├── tailwind.config.js # with --tailwind
├── elm-test-rs.json # with --test
├── .cursorrules # with --cursor
└── openEditor.sh # with --cursorFeature Details
Tailwind CSS Integration
When you add Tailwind CSS (--tailwind), you get:
- Pre-configured
tailwind.config.js - NPM scripts for development and production builds
- Beautiful starter template with gradient design
- Dark mode support (when combined with
--i18n)
Internationalization (i18n)
The --i18n flag adds:
- Language switcher (English/French by default)
- Dark/Light/System theme modes
- LocalStorage persistence for user preferences
- Auto-detection of browser language and system theme
- Easy-to-extend translation system
Testing with lamdera-program-test
The --test flag sets up:
- Effect pattern for testable Lamdera code
- Example test suite
- elm-test-rs configuration
- Compatible with all other features
Development Tools
Every project includes:
lamdera-dev-watch.sh- Auto-recompiling development servertoggle-debugger.py- Quick debugger toggling- Hot reload support with elm-hot
Examples
Basic Lamdera app
create-lamdera-app --name my-appFull-featured app
create-lamdera-app --name my-app --cursor yes --tailwind --test --i18nUsing Bun for faster installs
# Install Bun first: https://bun.sh
create-lamdera-app --name my-app --tailwind --bunAdd Tailwind to existing project
cd my-existing-app
create-lamdera-app --init --tailwindDevelopment
Running Tests
npm test
npm run test:watch
npm run test:coverageTest All Feature Combinations
./test-all-combinations.shThis creates 8 test applications with essential feature combinations and verifies they compile correctly.
Requirements
- Node.js ≥ 14.0.0
- npm ≥ 6.0.0
- Lamdera installed
- elm-test-rs (for testing features)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT © Charles-André Assus
Acknowledgments
- Lamdera for the amazing platform
- Tailwind CSS for the utility-first CSS framework
- elm-test-rs for fast Elm testing
