SketchAPI icon indicating copy to clipboard operation
SketchAPI copied to clipboard

Document when each part of the API was added

Open KevinGutowski opened this issue 5 years ago • 3 comments

For those that are trying to target old versions of sketch it's incredibly useful to know when I have to drop down to some sketch headers / appkit methods.

For example, in Apple's documentation there is a little SDK version number to help you know what version of MacOS it is supported with. Screen Shot 2019-03-11 at 6 25 22 PM

KevinGutowski avatar Mar 12 '19 01:03 KevinGutowski

That's a really good point, haven't had time to implement it yet.

I guess it would also be helpful to be able to navigate the docs for a specific version.

In the meantime, you can check here: https://github.com/BohemianCoding/SketchAPI/blob/develop/CHANGELOG.json (but I agree it's not really convenient)

cc @christianklotz

mathieudutour avatar Mar 12 '19 13:03 mathieudutour

I'm currently working on the documentation and including the availability of APIs would be very good indeed since we can't expect people to derive that information from the various branches.

I know that Apple generates this from source code annotations, e.g.

@available(OSX 10.9, *)
class Foo : NSObject {

}

Any suggestions for a streamlined process like this, which could also be useful for deprecations.

christianklotz avatar Mar 12 '19 13:03 christianklotz

oo looks like lodash uses some sort of @since notation https://github.com/lodash/lodash/blob/master/union.js#L10

I think its part of JSDoc https://jsdoc.app/index.html

I don’t fully understand how ya’ll generate the docs but perhaps its pretty straightforward to pull from the comment parameters.

KevinGutowski avatar Jul 11 '19 02:07 KevinGutowski