Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `--format` flag to `spago docs` #299

Merged
merged 3 commits into from Jul 2, 2019

Conversation

@elliotdavies
Copy link
Contributor

commented Jul 1, 2019

Description of the change

Add a flag to spago docs to support different documentation formats. Fixes #294.

Running stack test on master seems to lead to about half the tests failing, so I can't verify that these changes haven't broken them further.

Checklist:

  • Added the change to the "Unreleased" section of the changelog
  • Added some example of the new feature to the README
  • Added a test for the contribution (if applicable)

P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 馃槉

@elliotdavies elliotdavies force-pushed the elliotdavies:feature/docs-flag branch 2 times, most recently from 9b3f54b to a2d22f3 Jul 1, 2019

@elliotdavies elliotdavies force-pushed the elliotdavies:feature/docs-flag branch from a2d22f3 to 1f1ec8b Jul 1, 2019

@f-f

f-f approved these changes Jul 1, 2019

Copy link
Member

left a comment

Looks great! 馃憦

@f-f f-f marked this pull request as ready for review Jul 1, 2019

@elliotdavies

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

@f-f Awesome, I just need to do a bit more work to specify an output file when you choose markdown | ctags | etags - otherwise by default the compiler just dumps to stdout. (You only get generated files when choosing html.)

@elliotdavies

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

@f-f Actually, a question - in PureScript 0.13 the compiler will output HTML and MD to a generated-docs directory and ctags/etags to tags or TAGS files by default. In 0.12 it outputs HTML to generated-docs but any other option gets dumped to stdout.

What do you think is best for Spago to support? The defaults in 0.13 are fine, I think, but for anyone using 0.12 the stdout dump isn't going to be very useful (you can't even do spago docs --format ctags > tags because the tags file will end up including Spago's own logging). I could implement an --output option but purs doesn't support that in 0.12 so we'd have to implement it ourselves. Or we can just leave all the behaviour as it is.

@f-f

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

@elliotdavies great point. Since we're still in 0.x of both Spago and Purs let's not worry too much about old Purs versions (i.e. it's fine unless we break them, which doesn't seem the case).
And once we fix #256 we'll have a --silent flag to silence Spago's own output, so we should be good anyways.

So I'd say let's go with 0.13 defaults

@elliotdavies

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

@f-f OK! In that case I think this is ready to review 馃槃

@f-f

f-f approved these changes Jul 2, 2019

src/Spago/Purs.hs Show resolved Hide resolved

@f-f f-f merged commit a77b869 into spacchetti:master Jul 2, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@f-f

This comment has been minimized.

Copy link
Member

commented Jul 2, 2019

Thank you @elliotdavies! 馃檪

@elliotdavies elliotdavies deleted the elliotdavies:feature/docs-flag branch Jul 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.