Skip to content

Run result of generator through jsonrepair [add a post process command for text ops] #298

@fcisio

Description

@fcisio

Hey! I'm generating some package.json and the end result is pretty dirty.

I'm able to run prettier as a command with the sh option of the front-matter.
I would also like to run jsonrepair, which would allow not to write logic just for the commas in json.

jsonrepair doesn't have a CLI and I can't seem to find an alternative.

So I'm thinking it would be nice to be able to do something like:

const jsonrepair = require('jsonrepair')

jsonrepair(generatorOutput)

This would also allow to clean up pretty much anything with prettier.


As an alternative, I tried creating an helper, but there is no way to preserve ejs syntax, passing it in a function.

Possibly related to #296

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions