Skip to content

Add an option to flatten a D2 file that contains various imports into a single .d2 file #2694

@behrangsa

Description

@behrangsa

Let's assume that I have:

index.d2 -> imports x.d2, classes.d2
x.d2 -> imports y.d2, classes.d2
y.d2 -> imports z.d2, classes.d2

Add a --flatten <file-name> option to the D2 CLI that flattens index.d2 into a single self-contained file, with all imports reolved, and duplicates (classes.d2) unduplicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions