code0-definition-reader 0.0.8

The rust crate for reading the internal Code0-Definitions
Documentation

Definitions

Definition CLI

Setup

Install Cargo

Usage

(Stay inside the root directory when running the command)

General Report

./cargo run report
./cargo run report -p /path/to/definitions

Feature Report

./cargo run feature
./cargo run feature -p /path/to/definitions
./cargo run feature -f feature_name
./cargo run feature -f feature_name -p /path/to/definitions

Watch for Changes

./cargo run watch
./cargo run watch -p /path/to/definitions

Definition

./cargo run definition -n definition_name
./cargo run definition -n definition_name -p /path/to/definitions

TypeScript Definition Package

Install Package

npm i @code0-tech/code0-definition-reader --save-dev

Usage

const features = Definition("./path/to/definitions")

for (const feature in features) {
    const name = feature.name; //name of the feature (e.g. rest)
    const dataTypes = fearture.dataTypes; //dataTypes of this feature
    const flowTypes = fearture.flowTypes; //flowTypes of this feature
    const functions = fearture.runtimeFunctions; //runtimeFunctions of this feature
}