@bond-london/gatsby-transformer-json-extended

1.0.2 • Public • Published

Gatsby extended transformer for json

This builds on the standard gatsby-transformer-json and extends it to create more custom objects

If the json structure has a type and module field, the type is used to generate the new node type using the contents of the module object for the contents

e.g.

{
    "type": "Component 1",
    "module": {
        "title": "This is component 1",
        "messages": [
            "Message 1",
            "Message 2"
        ]
    }
}

It produces the graphql objects 'docComponent1' with the contents

{
    "title": "This is component 1",
    "messages": [
        "Message 1",
        "Message 2"
    ]
}

Package Sidebar

Install

npm i @bond-london/gatsby-transformer-json-extended

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

10.3 kB

Total Files

15

Last publish

Collaborators

  • nrandell