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

Linking separate file with examples #5

Closed
abozhilov opened this issue Nov 28, 2012 · 3 comments
Closed

Linking separate file with examples #5

abozhilov opened this issue Nov 28, 2012 · 3 comments

Comments

@abozhilov
Copy link

What I ever wanted is instead of put the examples of the usage directly in source code, to have separate file with examples, which will be used for generated examples in the documentation.
We will have double bonus from that. Clean source code, and good examples in the documentation.

@jdalton
Copy link
Owner

jdalton commented Nov 28, 2012

+1, could you give an example of what the JSDoc comment block would look like.

@abozhilov
Copy link
Author

I thought a little bit different strategy. Instead of linking every method I though about general examples file as:
https://gist.github.com/4163571
The body of the functions are the examples, which will be used in the documentation.

During the generation of the documentation there will be an option 'examples' => 'examples.js'.
This also give the ability of the user to easy load the examples.js and fire some examples.

What do you think about? This separation is not strong coupled and your code could be redistributed without or with different examples.

@jdalton
Copy link
Owner

jdalton commented Feb 24, 2015

Closing as stale.

@jdalton jdalton closed this as completed Feb 24, 2015
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