-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
mkPathArray key opt = concat $ mkString key <$> (NullOrUndefined <<< Just) | ||
<$> (fromMaybe [] (runNullOrUndefined opt) >>= expandGlob) | ||
|
||
mkDocgen :: String -> NullOrUndefined Foreign -> [String] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not necessarily sure the implementation of this option is in the spirit of things, so if you have a better idea for how it might be done, please say!
I can squash the commits if you prefer also. |
Looks good! Thanks for the updates. Can you please add the Regarding using glob for the And I am okay with the commits, no need to squash. But I will leave it up to you. |
Ah yep, good point about the README!
The JS and PS will be associated by scanning the JS files for a comment like Yeah, I wouldn't publish it just yet, just figured I'd bump the version for when it's ready. |
Thanks for clarifying. Makes sense. Can we say something in the README for the I just removed the words Noted on the publishing. The bump works for me, but I will hang off on putting it on NPM until purescript 0.7 is out (unless we need it sooner). |
Ah, and I am wondering if any exceptions will be thrown with |
What do you suggest we do for that - fail silently and return |
You're right there is no way currently to handle errors during the option building. I was testing out when exceptions would be thrown by glob, and it seems to only throw on input that is not a string. So I think we already enforce a string is required as input to glob. Perhaps leaving it as-is is the best thing to do. I think that works. |
More changes :)
ffi
option I added wasn't very useful in its previous form, as you'd always have to specify the full list of file paths or useglob
to do the work - figured I may as well integrate that into the plugin.docgen
option forpsc-docs
- it works a bit likecodegen
forpsc
:psc-docs
now requires all the input files, so this option lets you filter what modules to generate the docs for. It has a few permutations that are acceptable in the config: