warden 0.1.0 copy "warden: ^0.1.0" to clipboard
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.yaml file
  • ๐Ÿงต 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

7
likes
0
points
142
downloads

Publisher

unverified uploader

Weekly Downloads

Static Builder CLI

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ansicolor, args, path, watcher, yaml

More

Packages that depend on warden