Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Babel transform #82

Open
felixSchl opened this issue Nov 1, 2016 · 2 comments
Open

Babel transform #82

felixSchl opened this issue Nov 1, 2016 · 2 comments

Comments

@felixSchl
Copy link
Owner

felixSchl commented Nov 1, 2016

Write a babel transform that transforms the neodoc source text into a JSON structure which would in any case would always be faster than parsing the help text. It would probably live in it's own companion project? ... I probably won't find time to do this anytime soon but feedback would be great anyway. I think this is a more elegant approach over #66

@moll
Copy link

moll commented Feb 11, 2017

Does this have to be related to Babel? Couldn't you just provide a single "parse" function for anyone who wants to preprocess will call themselves? I could, for one, just use a Make target to parse .txt to .json. :)

@felixSchl
Copy link
Owner Author

Yeah you're right. The overarching issue here is how to provide users of neodoc w/ a way to pre-parse the help text before shipping, doesn't have to be babel of course, and probably doesn't make much sense to be. Neodoc does expose a parse function whose output can be fed into the run function: https://github.com/felixSchl/neodoc/blob/development/lib/neodoc.js. But if downstream users want to retain the ability to just write their help text in their source files, we need to find a way to apply this optimization w/ least amount of friction

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants