warden 0.1.0
warden: ^0.1.0 copied to clipboard
Static Builder CLI
Warden #
Static Builder CLI
Warden is a lightweight CLI tool to watch and compile Dart and Sass files for frontend projects. It's designed for projects that use server-side rendered HTML but still want custom JS/CSS assets compiled automatically.
Features #
- ๐ช Watches your Dart and Sass files and recompiles on change
- ๐งฑ Moves specified dependencies (e.g. node_module installed files) into your build output
- ๐ Fully configurable via a
warden.yamlfile - ๐งต Supports multiple tasks like compiling Dart code to JS & compiling sass to css.
Setup #
Create a warden.yaml in your project root with the following structure:
source_dir: examples
destination: static/
dependencies:
source: examples/node_modules
files:
- 'bootstrap/dist/js/bootstrap.min.js'
- 'bootstrap/dist/css/bootstrap.min.css'
- 'popper.js/dist/umd/popper.min.js'
tasks:
frontend:
executable: dart
args: ["compile", "js", "bin/main.dart", "-o", "../static/main.js"]
src: examples
styles:
executable: dart
args: ["run", "sass", "sass/index.scss:../static/index.css"]
src: examples
โถ๏ธ Running #
Run Warden from your terminal in watch mode:
dart run warden --file=warden.yaml
This will: โข Copy specified dependency files into the build static/ directory โข Compile Dart to JavaScript โข Compile Sass to CSS โข Watch all source files and recompile on change
๐ฆ Installation (coming soon) #
dart pub global activate warden
Then run from any Dart project:
warden --file=warden.yaml
๐งช Example Project Structure #
examples/
โโโ bin/
โ โโโ main.dart
โโโ lib/
โ โโโ examples.dart
โโโ sass/
โ โโโ index.scss
โโโ node_modules/
โโโ warden.yaml
License
MIT ยฉ 2025 joegasewicz