Conversation
|
Added a // strip-styles.mjs
export default {
Collection(_, node) {
delete node.flow
},
Scalar(_, node) {
delete node.format
delete node.type
}
}and then apply it: for this output: hello: world |
|
@eemeli Nice! I had actually already worked up a PR for a CLI, but it got sidelined… This is working well, though missing the option to output pretty-printed JSON… Hence my PR in #559. Also to reiterate what I mentioned in #479 (comment):
which I think would help adoption… |
Please submit this as a separate issue. |
Closes #479, CC @danielbayley & @antonmedv
Here's the
npx yaml -houtput, as currently implemented.I'm still contemplating a few additions like a node style normaliser, and the docs will need an update.