+1 for the above concerns. IMO it's not good enough to provide a collection of plugins in github as documentation. As a new Discourse plugin developer, I have no idea which of these plugins represents a good "canonical" example for doing things. And some of the plugins are really sophisticated - full of magic naming conventions and ES6 wiring that's unfamilar to a traditional JS developer.
It's so hard to identify magic naming conventions when all you have is a load of pre-made plugins to go on. Which words are keywords, and which words are arbitrary?
A few more canonical examples would go a long way.
For an experienced plugin developer these examples would take minutes to write.
For a brand new plugin developer these examples would save hours of frustrated clicking around.
A few questions I have in particular as a n00b discourse plugin developer:
- Why are we using Vagrant for dev and Docker for prod?
- How do I write a simple ES6 unit test? (not a whole acceptance test that requires a running Discourse instance). I got lost in a mire of gulp/grunt/phantomjs/babel etc. Surely there's an easier way?
- Is there a browser that I can run ES6 code in directly? If so, how? I know ES6 is still pretty new, but I can't believe how little documentation exists on the web for this seemingly simple task
- What's the canonical way of writing a plugin that does a simple "replace this [keyword]params[/keyword] with something based on params"? I've tried a few different ways - none of them feel right