JSON schema file compiler for generating an interactive model of website navigation.
This compiler accepts custom files or files generated by the captor script containing the JSON schema format. Consequently, generate a series of HTML files that represent a simulation of the navigation on a web site.
# Project installation
npm install @opentech-ux/lom-compiler-cli
# Global installation
npm install -g @opentech-ux/lom-compiler-cliYou can pass the following options via CLI arguments.
| Description | Short Command | Full Command | Default value |
|---|---|---|---|
| Select the file from which create the simulation | -s | --source | "." (Gets all JSON files in the current directory) |
| Folder name where to save the compilation result files | -o | --output | "OpenTech-UX LOM Compiler" |
-
Initial project folder structure
Project folder/ ├─ data/ │ ├─ json/ │ │ ├─ basic-lom/ │ │ │ ├─ basic.lom.json │ │ ├─ multi-lom/ │ │ │ ├─ basic.lom.json │ │ │ ├─ script.lom.json ├─ script.lom.json
-
Use examples in a the console
-
Without parameters
lom-compiler
-
With source defined (file) and output (directory) defined
lom-compiler -s ./data/json/basic-lom/basic.lom.json -o ./build/basic-lom
-
With source defined (directory) and output (folder name) defined
lom-compiler -s ./data/json/multi-lom -o multi-lom
-
-
Project folder structure after executing the examples
Project folder/ ├─ data/ │ ├─ json/ │ │ ├─ basic-lom/ │ │ │ ├─ basic.lom.json │ │ ├─ multi-lom/ │ │ │ ├─ basic.lom.json │ │ │ ├─ script.lom.json ├─ script.lom.json ├─ OpenTech-UX LOM Compiler/ │ ├─ about/ │ │ ├─ index.html │ ├─ contact/ │ │ ├─ index.html │ ├─ index.html ├─ build/ │ ├─ basic-lom/ │ │ ├─ otherPage/ │ │ │ ├─ index.html │ │ ├─ index.html │ ├─ script-lom/ ├─ multi-lom/ │ ├─ about/ │ │ ├─ index.html │ ├─ contact/ │ │ ├─ index.html │ ├─ otherPage/ │ │ ├─ index.html │ ├─ index.html