-
Notifications
You must be signed in to change notification settings - Fork 10
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
Lack of documents #11
Comments
Yes, you're right, a lot of documentation is still lacking. Unfortunately it takes more time than I have available at the moment to write good docs, and I may have been over-ambitious when I planned them out. Though I have reached out to a few people, this project still only has a single contributor. If you have the time and interest, I would gladly accept any docs you could offer and could help answer any questions you might have. Otherwise, you're the first person to actually ask for more docs, so I'll try to carve out some time here and there to write more, but I can't make any promises. I love working on free open source software, but unfortunately it doesn't pay the bills for me yet. The docs site is built using Hexo (docs are written in Markdown) and is hosted by GitHub Pages. The source for it lives here: https://github.com/sywac/sywac-website Thanks for opening this (it helps raise awareness), and thanks for using sywac! |
Little suggestion: It''s hard to help in the documents unless digging through the source code. |
@soimy That's a good suggestion, thanks. I'll try to add some content to the Common Type Properties page this weekend. |
What I've found, is that if you're comming from yargs, a lot of the API is similar. I've done the migration from yargs to sywac, and can say, sywac is a much better yargs. This is often what happens when the old is left behind, and the lessons are taken into a new project. Looking forward to seeing this project move forward, it has great potential out of the box. |
@nexdrew Hi, I'm struggling with getting sywac to work for my app. Any chance you could get documentation up for Command Modules? Like what properties should the exported object contain. What I'm trying to do is configure commands by defining class properties. Seems like its possible and I have it almost working. I'm hoping you can shed some light on how it should work 🙏 |
@lots0logs Unfortunately I don't have time right now. I recommend reading over prior issues (particularly my comments with code snippets) or skimming through test code (particularly the fixtures) to learn more about the api that is currently lacking documentation. You could also review code of other npm packages using sywac, and I also helped the stellar project migrate from yargs to sywac, so that might be helpful. When it comes to using classes for commands, try setting command props to class ListCommand {
constructor () {
this.flags = 'list [something]'
this.aliases = ['ls']
this.desc = 'List something'
this.paramsDesc = ['Something to list']
this.setup = this.setup.bind(this)
this.run = this.run.bind(this)
}
setup (sywac) {
// configure options or subcommands specific to this command
}
run (argv, context) {
// actually run the command here
}
} |
I wonder if there's a way you could break up the epic job of continueing the docs @nexdrew, maybe into smaller tasks, then consumers can chip in as they go? Thoughts? |
Although it's a long time coming, we have begun breaking up the remaining pages into individual issues at https://github.com/sywac/sywac-website/issues. |
Lots of them are under construction.
BTW sywac itself is great and easy to use with no extra dependency. Good work
The text was updated successfully, but these errors were encountered: