Manifest format

This section describes the manifest format file zonegfx.toml, placed at a project's root directory.

A manifest may describe a package and a workspace simultaneously.

Example

[package]
id = "com.business.product"
version = "0.1.0"

[compiler-options]
main-component = "src/Main.es"

Package section

[package]
# The package ID.
#
# Patterns:
#
# - `com.<company>.<project-name>`
# - `org.<organisation>.<project-name>`
# - `net.<organisation>.<project-name>`
# - `me.<author>.<project-name>`
# - `goog.<project-name>`
# - `<project-name>`
#
# `<project-name>` may be a dotless name including optional
# hyphens.
#
# `goog.<project-name>` belongs to the `com.google` organization.
#
id = "com.company.project-name"

# SemVer-compatible version number.
#
version = "0.1.0"

# Author list.
#
authors = ["John Doe <johndoe@example.com>"]

# Homepage URL.
#
homepage = "https://project.com"

# Source repository URL.
#
repository = "https://example.com/johndoe/project"

# License type.
#
# Examples:
#
# "MIT", "Apache-2.0", "MIT OR Apache-2.0"
#
license = "MIT OR Apache-2.0"

# Description.
#
description = "Package description."

# Keywords.
#
keywords = []

# Categories.
#
categories = []

# Files to exclude/include when publishing.
# (Similiar to .gitignore entries, possibly with an exclamation prefix.)
#
ignore = []

# Shared objects (.so or .dll) to contribute alongside
# the program.
#
# Entries in this option can interpolate `{target}`
# for the arfifact directory.
#
# Entries not found here are ignored; for instance,
# you could have a .dll on Windows, but not on other platforms.
#
shared-objects = [
    "{target}/so/org.makers.plus/libcore.so",
]

# Plain metadata ignored by ZoneGFX
[package.metadata]
plain = 0

Workspace section

[workspace]
members = [
    "packages/foo",
    "packages/bar",
]

Dependencies sections

# Dependencies.
#
[dependencies]
org.maxima.move = "0.1"
org.maxima.move = { path = "../move", version = "0.1" }
# git dependencies may have a `rev`, `tag` or `branch` keys.
#
# rev examples:
#
# - rev = "4c59b707" (a commit by its SHA1 hash)
# - rev = "refs/pull/493/head" (HEAD commit of PR 493)
#
# tag examples:
#
# - tag = "1.10.3"
#
# branch examples:
#
# - branch = "master"
#
# If it's a workspace, then ZoneGFX will look for the
# matching member, inheriting any dependencies.
#
org.maxima.move = { git = "https://github.com/maxima/move", version = "0.1" }

# Development dependencies. *Used by unit-testing.*
#
[dev-dependencies]
org.maxima.lets-go = "1"

# Build dependencies. *Used by build scripts.*
#
[build-dependencies]
org.maxima.life = "1"

Compiler options section

[compiler-options]
# Directory at which to find ES source files.
# (Defaults to "src".)
#
source-path = "src"

# Main component script, for an application
# package.
#
# This script must export a `default` ZoneDS component.
#
main-component = "src/Main.es"

# Indicates whether the main source path consists
# of declaration-only EZMAScript sources.
#
# Default: false
#
declaration = false

# following: "error", "warn" or "allow"
unused-labels = "warn"
unreachable-code = "warn"
unused-locals = "warn"
unused-parameters = "warn"

Terminal section

Used for contributing terminal applications, installable through zgfx terminal install.

[[terminal]]
name = "mycmd1"
main-class = "src/terminal/MyCommand1.es"

[[terminal]]
name = "mycmd2"
main-class = "src/terminal/MyCommand2.es"

Test section

Unit-testing settings. (May use import { ... } from "mocha";)

[test]
# Directory at which to find ES unit-testing source files.
#
# Defaults to test/.
#
source-path = "test"

# Main unit-testing script.
#
# For this script the ZoneGFX package
# declared in the same manifest will be available
# to import from.
#
# Defaults to test/test.es.
#
main-script = "test/test.es"

Formatting section

[formatting]
# Number of spaces per indentation-level.
#
# Default: 4
tab-width = 4
# Use tabs for indentation?
#
# Default: false
use-tabs = false
# Whether to insert semicolon after statements.
#
# Default: true
semicolon = true
# Whether to use single quotes instead of double quotes.
#
# Default: false
single-quote = false

Application section

[application]
# Human name (`en` is the default locale).
human-name."en" = "Application 1"
human-name."pt-BR" = "Aplicativo 1"
# Frames per second.
framerate = 30
# Background color.
background = "#000"
# App-installation resources directory.
#
# This is used by the `app:` scheme for resolving
# assets from the app's installation directory.
#
# Default: res/.
#
resources = "res"

[application.initial-window]
# Window size
width = 800
height = 600