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

Lack of documents #11

Open
soimy opened this issue Jan 4, 2018 · 8 comments
Open

Lack of documents #11

soimy opened this issue Jan 4, 2018 · 8 comments

Comments

@soimy
Copy link

soimy commented Jan 4, 2018

Lots of them are under construction.
BTW sywac itself is great and easy to use with no extra dependency. Good work

@nexdrew
Copy link
Member

nexdrew commented Jan 4, 2018

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!

@soimy
Copy link
Author

soimy commented Jan 5, 2018

Little suggestion:
Better to add doc for Common Type Properties, it's reference many times but without it, u cannot do basic setups.

It''s hard to help in the documents unless digging through the source code.

@nexdrew
Copy link
Member

nexdrew commented Jan 5, 2018

@soimy That's a good suggestion, thanks. I'll try to add some content to the Common Type Properties page this weekend.

@binarymist
Copy link

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.

@lots0logs
Copy link

@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 🙏

@nexdrew
Copy link
Member

nexdrew commented Feb 11, 2019

@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 this within the constructor of the class, e.g.

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
  }
}

@binarymist
Copy link

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?

@elliot-nelson
Copy link
Member

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.

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

5 participants