Crowdsourced FlashPunk Documentation


(Zachary Lewis) #1

So, I’ve been working on some handcrafted documentation to allow for the best documentation possible.

http://useflashpunk.github.io/flashpunk-docs

Here’s the current state of things. Lots of stuff is missing, but all the classes are there. Image is the most fleshed-out.

If you’d like to help, please fork useflashpunk/flashpunk-docs and add whatever you see fit! I think the first thing we need is all the properties and functions, and we can proceed with examples from there. It’s tedious, but rewards the whole community.


(Jonathan Stoler) #2

This is a great idea! I’ll try to contribute when I have time.

A couple questions, though:

  • How should we denote inherited/read-only methods?
  • I’ve never used Jekyll before, so I’m not completely sure how it works. Is there a way to write a custom Jekyll “plugin” or “parser” or something so we don’t have to write these large HTML tables by hand?

In terms of the first question, I propose we add a class to the td for read-only and inherited, then style it differently in CSS, plus add a little indicator. As long as it’s consistent throughout the documentation, any solution should be okay.


(Linck) #3

Examples in the documentation are really really awesome. Keep up the good work!


(Ultima2876) #4

I agree this will be super helpful. I’ll see if I can find time to help with it though I’ve been super busy lately :confused:


(Zachary Lewis) #5

Jekyll can apparently use “data,” but I don’t think there’s any easy way to auto-generate the stuff we need other than writing some code to do it or just doing it ourselves. We could also put all the information into the YAML header block and scrape that, if you want an object-driven method.

title: Image
layout: default

# List of class properties
properties:
    - name:        alpha
      type:        Number
      description: "Change the opacity of the Image, a value from 0 to 1."
      access:      public

    - name:        angle
      type:        Number
      default:     0
      description: "Rotation of the image, in degrees."
      access:      public

This would also let us automatically scrape parent classes if we’re smart about it.


(Jonathan Stoler) #6

This sounds a bit messy but also maybe the best way to do it? I’ll mess with this idea later today and submit a pull request if it works well.


(Sharon Shalom Iluz) #7

you should make a link in the home page of FP easy access


(Zachary Lewis) #8

Once we reach a stable, complete version, I will.