@opentech-ux/lom-compiler-cli
v1.0.4
Published
Compiler to generate playable HTML wireframe site from layout description model (LOM)
Downloads
11
Readme
OpenTech UX LOM Compiler
Description
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.
Installation
# Project installation
npm install @opentech-ux/lom-compiler-cli
# Global installation
npm install -g @opentech-ux/lom-compiler-cli
Options
You 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" |
Uses examples
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