Command Line Interface
yarn add --dev @elodin/cli
This package provides the CLI for Elodin with compilation commands.
It requires a valid Elodin configuration to run.
Usage
# Single build elodin # Single build with cleanup elodin -c # Single build + build on every change elodin -w # Single build with cleanup + build on every change elodin -c -w # Build on every change elodin -w -sib
Configuration
The CLI comes with a set of configuration options.
One can also use run
elodin --help
or elodin -h
for a quick overview of all the configuration options.Option | Default | Description |
---|---|---|
| ./elodin.config.js | The relative path to your Elodin configuration. |
| Enables watch mode to automatically recompile on file changes. | |
| Remove previously generated files before compilation. Helps to get rid of old files where the Elodin file has been removed. | |
| Skips the initial build in watch mode. Only works with watch mode enabled. |
Watch Mode
Watch mode (using either
--watch
or the shorthand -w
flag) will automatically recompile all files on detected file changes.This is very useful for development, where you want to apply changes immediately without having to compile manually again and again.