Liking cljdoc? Tell your friends :D

Command-line Interface

epsilon-clj put emphasis on being able to integrate generation workflow into your own. Having a library that does not have a CLI introduces some complexities when you want to take advantage of your CI/CD, and thus epsilon-clj should avoid being that library.

This page serves as a reference guide on different commands and options you can use.

!!! info For most up-to-date commands and options, use -h or --help option.

It is also assumed that you have installed epsilon-clj. If not, check out Installation page.

The general structure of a typical epsilon-clj command is like this:

java -jar epsilon-{{ file.version }}-standalone.jar [options] [command]

Options

Short formLong formDescription
-h--helpDisplay help message.
-d--dirTemplate directory. Can be relative or absolute.
-m--modelPath to XML model to use. Can be relative or absolute. Can be used multiple times.
-o--outputWhere to output the templates. Can be relative or absolute.
-v Verbosity level; may be specified up to 2 times. Levels: INFO -> DEBUG -> TRACE
-w--watchWatch the given template directory.

!!! important Due to a certain bug, on Windows, any modification to the models will not trigger regeneration.

Commands

generate

Generate all files. Requires

  • template directory
  • model paths
  • output directory

!!! important This option will run validation against the models before generation.

validate

Validate all models. Requires

  • template directory
  • model paths

watch

Standalone watch mode. Requires

  • template directory
  • model paths
  • output directory

!!! important This command is identical like the watch option. Note that this option will not validate or generate anything beforehand.

Examples

# Display help message.
$ java -jar epsilon-{{ file.version }}-standalone.jar -h

# Execute generation with a model, a template directory and an output directory
$ java -jar epsilon-{{ file.version }}-standalone.jar -m "model.xml"  -d "templates" -o "gen" generate

# Execute watch mode with a model, a template directory and an output directory
$ java -jar epsilon-{{ file.version }}-standalone.jar -m "model.xml"  -d "templates" -o "gen" -w generate

# Execute validation with a model and a template directory
$ java -jar epsilon-{{ file.version }}-standalone.jar -m "model.xml"  -d "templates" validate

# Execute standalone watch mode.
$ java -jar epsilon-{{ file.version }}-standalone.jar -m "model.xml"  -d "templates" -o "gen" watch

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close