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
Help Wanted: Documentation #25
Comments
Hi, I created a gatsbyjs template for documentation. Here you can see https://wpack.io and here's the repo https://github.com/swashata/wp-webpack-script/tree/master/site I can create a starter template out of it, or even help you in implementing. For the docs itself I will this it out to replace inquirerjs and maybe I could be of help. |
I recommend to use VuePress to write the docs. |
Thanks for the comments. We want documentation to be complete first. At the moment, technical writing is what we need help with most. |
@jonschlinkert is enquirer direct swap for inquirer? so far i'm seeing that the answer is "Yes" but cannot see this documented anywhere -- and would be really worthwhile to document that. |
Maybe we can create a new repository as |
@g-plane I haven't decided yet where we're going to put the docs. We might do what you're suggesting. First I want to get the markdown documentation finished since that doesn't require a website and (IMHO) it's easier to just focus on content until it's complete.
I already have |
Good points. And we can use documentation tool to generate static website for better reading experience. |
@jonschlinkert If you are interested in guides similar to this: https://stickyroll.github.io/react-stickyroll/doc/guide/configue-stickyroll/Readme.html?guides-enabled=true I'd love to help writing these guides. It should be basic markdown so it can then be used in whatever tool to display it nicely. |
Yes that would be great! Any help would be appreciated! |
I'll see if I can whip up an example. No promises, gotta study the new API first. |
@jonschlinkert I'm not sure if this is what you're looking for: https://github.com/pixelass/enquirer/blob/docs/form-example/docs/prompts/form/getting-started.md |
@pixelass that's great! I love it! Thank you! |
@jonschlinkert Glad to hear. I can continue in this manner (starting with forms since I'm currently using it in a setup). I will probably run into issues and my guides will require a good review to ensure the validity (haven't used this in a while) but these guides are small enough to review on the go and write during small breaks (Hoping to eventually encourage more contributors to the docs). I can pick a lot of info from the old examples but updating those would go into another PR (out of scope) I'll try to get the forms done as good as I can before I send in the first PR. |
Great! FWIW all of the examples in the examples folder are for the current version of Enquirer. If you find one that is broken, please feel free to just create an issue instead of trying to fix it, or handle it however you prefer.
I also have some higher level docs created locally, for things like styling. If you want to do a PR with you docs first, I can merge those in before pushing up my changes.
Thanks again!
…Sent from my iPhone
On Dec 13, 2018, at 7:19 AM, Gregor Adams ***@***.***> wrote:
@jonschlinkert Glad to hear. I can continue in this manner (starting with forms since I'm currently using it in a setup).
I will probably run into issues and my guides will require a good review to ensure the validity (haven't used this in a while) but these guides are small enough to review on the go and write during small breaks (Hoping to eventually encourage more contributors to the docs). I can pick a lot of info from the old examples but updating those would go into another PR (out of scope)
I'll try to get the forms done as good as I can before I send in the first PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@jonschlinkert I know that the example for form uses the old API: https://github.com/enquirer/enquirer/blob/master/examples/form/prompt.js const { Form } = require('enquirer'); as do some others (probably all those that used to have named exports). |
I’m not sure what you mean. That API is current. (Also, the Form prompt was created for Enquirer v2.0, so it couldn’t have been used that way before). Each prompt is set as a static method on Enquirer, in case you need access to a prompt instance.
edit: to elaborate (or maybe as a reminder), in the old, Enquirer v1.0 API all of the prompts were separate libraries that needed to be registered first.
|
In case it helps:
|
Thanks for the info. Maybe my issue was related to typescript. I remember looking at the typings and not finding the static properties. Any info on the type definitions? Are those up to date? I'll test this later and consider this when writing the guides (I obviously need to adjust the first one). |
Someone read what I wrote!!! 😀 I said it was recommended because, at the time, all of the examples in the README used the
There's PR #82 open right now that might address those. |
@doowb thx for the info. That explains the misunderstanding. @jonschlinkert You're right, I'm not worried, I just want to get a few things straight. (Would hate to have to modify guides later). My questions were answered. I'll continue and send in PRs as smaller batches. |
I was thinking about adding new recordings (via svg-term). It returns an SVG (instead of gif) which has impact on the rendering performance of the sites using it (e.g. the main Readme.md) I would also like to add these to each guide I create. (the examples created in this guide will be located in a separate directory It's also good to know the guides provide working code instead of blindly written snippets. |
Hey gang, if you need any additional resources, I would be happy to help. I don’t want to step on toes or intrude, but I can assist |
@mikeerickson look at PR #99 This is probably what we'll be going for. Since the docs are already split into sections you could just follow the examples and add a new folder (prevents conflicts before the fist merge). I added some tools for screencasts (asciicast) which need to be integrated in a better way (I'm thinking gh-pages file hosting https://enquirer.github.io/media). @jonschlinkert @doowb opinions on having a separate repo for docs? |
@pixelass I will have a look at this in the morning |
Yeah, I think we touched on this somewhere else, maybe another issue. Just for now I'd like to keep everything together. Once the markdown docs are more comprehensive and we start designing the site, we might switch to another repo. |
Any additional help would be awesome! |
My new PR already accounts for this. I agree that the focus right now is getting more docs written. |
@jonschlinkert @pixelass @mikeerickson I've just spent a solid hour reading as much as I could and plaid around with the examples provided. There's plenty of content to get an understanding of how to use this, but it's scattered all over the place and repeated multiple times in different folders. Some consolidation into a gitbook, github wiki, or vuepress is needed. This project is a game changer! So responsive, easy to understand, great UX for the terminal. Bravo all around my friends =] |
@roblav96 thx for the kind words. Once we have more content we will move to a library to make the info easily accessible. Right now the focus is creating more content and matching examples. There won't be too much discussions about wiki-libraries though. We will use what makes sense once we have a bigger picture. |
Earlier today, #24 was published as 2.0 with the
beta
tag! The only thing stopping us from merging to master and publishing 2.0 is documentation.If you'd like to help with docs (readme documentation only, for now), here is an outline of what we need:
Enquirer
class. Enquirer itself can be viewed as the prompt "runner". It handles state and events for multiple prompts, etc.Prompt
class - ThePrompt
class creates the readline interface, handles keypress events, and other conveniences that simplify creating custom prompts. ThePrompt
class is inherited by every other prompt.type
in the lib/types directory. The types -string
,number
,boolean
andarray
- are classes that can be extended to create higher level prompts. For example, theInput
prompt class inherits theStringPrompt
class, and theSelect
prompt inherits theArrayPrompt
class. This approach makes prompts extremely simple to create, extend, and customize. Thetype
classes are just a convenience, and don't need to be use if you'd rather just extend the basePrompt
class.message
,name
, etc. We can list these with the basePrompt
class. Then in the docs for each prompt we only need to list the special options supported that prompt.Other stuff
We encourage you to tell your friends and write about Enquirer! We're really excited about how awesome Enquirer 2.0 is, and we think you'll love it too!
The text was updated successfully, but these errors were encountered: