Skip to content

Nested Generators #41

@GarThor

Description

@GarThor

The wiki seems to describe a process with generators, where they can be nested, but the wiki article seems to be incomplete...

See section: "referencing other generator sources" --> https://github.com/jsnee/vscode-dmbinder/wiki/Content-Generation#referencing-other-generator-sources

Several previous sections in this part of the wiki seem to reference that this is a thing, but I can't seem to get it to work. It seems like it's just deleting that part of the generator when I run it in the terminal... and I'm not really sure what I'm doing wrong.

I see in the file: https://github.com/jsnee/vscode-dmbinder/blob/master/jsonSchemas/generatorSource.schema.json, it looks like there's a field meant to specify extra sources for generators, but it's labeled as an object instead of an array?

A previous section of the document seems to indicate that I should be able to create three generators...

npcFirstName.dmbgen.json

{
    "generatorType": "basic",
    "values": [
        "john",
        "steve",
        "james",
        "daisey"
    ]
}

npcLastName.dmbgen.json

{
    "generatorType": "basic",
    "values": ["dough", "doh", "doe"]
}

and finally
npcName.dmbgen.json

{
    "generatorType": "basic",
    "values": ["{npcLastName}, {npcFirstName}" ]
}

however when I try to run this generator, all I get is...

VSCode DMBinder version 0.5.13
DMBinder> generate npcName
, 
DMBinder> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions