Getting Started

Basic Implementation

The following example demonstrates the minimal configuration required to register a custom export format:

module.exports.init = async () => {
  api.nexomaker.registerExportFormat({
    id: 'my_plugin',
    name: 'My Plugin Format',
    
    transform: (item) => ({
      item_id: item.id,
      display_name: item.name,
      item_type: item.type,
    }),
  });
};

This configuration establishes a functional export format with automatic item normalization and default file handling.


Data Model

Normalized Item Structure

All items processed through the transform function are automatically normalized to a consistent data structure. This normalization ensures predictable data access patterns across different item types.

Core Properties

The following properties are guaranteed to be present on every normalized item:

Module Data

Module data is exposed as a flat object containing all registered module values for the specific item:

Example:

Asset References

Asset paths are provided as arrays of relative file paths:

circle-info

To know the structure and name for each key, you've to check the item.yml saved in your Nexo Maker formatted project accessible from: "Documents/NexoMaker/Projects/yourproject/Data/yourfolder/yournamespace/youritem"


API Reference

registerExportFormat(config)

Registers a custom export format with the NexoMaker export system.

Parameters

config object - Export format configuration object

Property
Type
Required
Description

id

string

Yes

Unique identifier for the export format

name

string

Yes

Human-readable display name

transform

function

Yes

Item transformation function

files

object

No

File structure configuration

hooks

object

No

Lifecycle hook implementations

Example


Last updated