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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

62 docs generation docs hotreload #149

Conversation

TheAngryByrd
Copy link
Owner

Proposed Changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to MiniScaffold?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Build and tests pass locally
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link
Collaborator

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems super-reasonable, and if you wanted to make the edit-templates-and-recompile cycle even better then you could even use fcswatch on the project. nice.

So a total-hotreload use case might be fcswatch <project> -- watch <glob>, right? To hotreload generation of the docs as you write them + hotreload restarting of your webserver when you change the templates?

let parse (fileName : string) source =
let doc =
let fsharpCoreDir = sprintf "-I:%s" fsharpCoreDir
let runtimeDeps = "-r:System.Runtime -r:System.Net.WebClient"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the set of dependencies to typecheck/run against, we may want to steal the logic from https://github.com/fsharp/FsAutoComplete/blob/master/src/FsAutoComplete.Core/FSIRefs.fs. This improves on the assembly-location logic from FCS (which fails per dotnet/fsharp#7701)

@TheAngryByrd
Copy link
Owner Author

This seems super-reasonable, and if you wanted to make the edit-templates-and-recompile cycle even better then you could even use fcswatch on the project. nice.

So a total-hotreload use case might be fcswatch <project> -- watch <glob>, right? To hotreload generation of the docs as you write them + hotreload restarting of your webserver when you change the templates?

Yeah that was the intention, though I was just using dotnet watch but same principal applies.

@dsyme
Copy link

dsyme commented Oct 18, 2019

Is this almost ready, and will it give a sample for .NET Core doc generation that I can copy into other repos? :-)

@TheAngryByrd
Copy link
Owner Author

Yeah this is pretty much good to go. There's a few things that I don't have working such as:

  • Generating a Nav structure from the folder structure
  • Good styling / structure of pages
  • Dealing with different Target Frameworks
  • Dealing with multiple (older) versions of the documentation

But these aren't what I'd consider show stoppers.

@TheAngryByrd
Copy link
Owner Author

I'm gonna go ahead and merge this back into the other branch now, then clean it up more there.

@TheAngryByrd TheAngryByrd merged commit 7b0085e into 62-docs-generation-fsharp-formatting Oct 18, 2019
@TheAngryByrd TheAngryByrd deleted the 62-docs-generation-docs-hotreload branch December 24, 2019 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants