Project

juce-cli

0.0
The project is in a healthy, maintained state
A Ruby-based CLI wrapper for the juce Clojure template engine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

juce-cli

Gem Version

juce-cli is a Ruby-based command-line interface for juce,
a Clojure DSL designed for generating HTML using S-expression syntax.


Overview

juce is a lightweight and expressive DSL that uses Clojure’s syntax to generate HTML.
For example:

(div "Hello" (span "world"))

juce-cli allows you to evaluate such DSL expressions directly from the command line and output HTML.

$ echo '(div "Hello, World!")' | juce
<div>Hello, World!</div>

Requirements

To use juce-cli, the following software must be installed:

  • Ruby 3.3.4 or higher
  • Clojure CLI 1.12.4 or higher

Ruby installation guide: https://www.ruby-lang.org/en/documentation/installation/

Clojure installation guide: https://clojure.org/guides/install_clojure

Installation

RubyGems

$ gem install juce-cli

Bundler

Gemfile:

gem "juce-cli"

Install:

$ bundle install

Run:

$ bundle exec juce ....

Usage

Basic examples

$ echo '(div "Hello, World!")' | juce
<div>Hello, World!</div>

# this is equivalent to the above
$ juce -e '(div "Hello, World!")'
$ echo '(div :id 123 :class "xyz hoge" "Hello, World!")' | juce
<div id="123" class="xyz hoge">Hello, World!</div>

Help

$ juce --help

DSL Specification

The full DSL specification, examples, and extension mechanisms are documented in the juce repository: https://github.com/tmkw/juce

License

This project is licensed under the BSD 2-Clause License (SPDX: BSD-2-Clause). See the LICENSE file for details.

Author

Takanobu Maekawa

https://github.com/tmkw