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

update examples #49

Open
ringabout opened this issue Sep 16, 2020 · 8 comments
Open

update examples #49

ringabout opened this issue Sep 16, 2020 · 8 comments

Comments

@ringabout
Copy link
Member

update examples like gin web framework

@keshon
Copy link
Member

keshon commented Sep 16, 2020

Is it better if I make a separate repo on my side for examples during developing so I wont have to bother with pull requests until I'm done?

@keshon
Copy link
Member

keshon commented Sep 16, 2020

that would mean that all examples will assume that prologue is installed globally

@ringabout
Copy link
Member Author

I think you counld use runableExamples for simple examples. runnableExamples will be checked.

@ringabout
Copy link
Member Author

ringabout commented Sep 16, 2020

You could create a seperate repo in planety organization and rely on global prologue installation.

@keshon
Copy link
Member

keshon commented Sep 16, 2020

What did you mean by runableExamples? I'm kinda missed it.
I suggest I create some repo on my side like prologue-examples and will gradually fill it with examples (I will do it at my free time). When I finish I can add them to my fork of prologue and will create a pull request to merge.

@keshon
Copy link
Member

keshon commented Sep 16, 2020

You could create a seperate repo in planety organization.

Ok great then!

@ringabout
Copy link
Member Author

ringabout commented Sep 16, 2020

You could ref to this document
https://nim-lang.github.io/Nim/docgen.html
Generally, you can write an example file with rst comments like

# example1.nim

## Using GET, POST, PUT, PATCH, DELETE and OPTIONS
## -----------------
runnableExamples:
  proc hello(ctx: Context) {.async.} = discard
  doAssert ................

## Parameters in path
## -----------------------
runnableExamples:
  proc hello(ctx: Context) {.async.} = discard
  doAssert ................

runnableExamples docs in https://nim-lang.org/docs/system.html#runnableExamples%2Cuntyped

@keshon
Copy link
Member

keshon commented Sep 16, 2020

OK, noted, will take a look, thanks!

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

No branches or pull requests

2 participants