FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

message_encoding in documentation for Repo.createCommit · Issue #86 · nodegit/nodegit · GitHub

Repository navigation

message_encoding in documentation for Repo.createCommit #86

Description

The documentation incorrectly states 'message_encoding' as being an argument for Repo.createCommit: http://www.nodegit.org/nodegit/#Repo-createCommit

What can I do to fix and generate the documentation?

EDIT: Oh this also applies to parent_count

Activity

  1. FrozenCow commented on Sep 4, 2013

    ContributorAuthor

    Found another one: http://www.nodegit.org/nodegit/#Repo-createBlobFromBuffer
    Has Repo.prototype.createBlobFromBuffer(buffer, len, callback), should be Repo.prototype.createBlobFromBuffer(buffer, callback) (without len)

  2. nkallen commented on Sep 4, 2013

    Contributor

    Hi @FrozenCow

    Thanks for being an intrepid beta-tester!

    As you've noticed, nodegit has two layers, the 1:1 mapping and a thin JS convenience layer on top. All of the documentation so far is generated from the 1:1 mapping. There is no documentation from the convenience layer, except the examples. :( . I need to figure out a way to merge the jsdoc style documentation from the javascript code with the 1:1 json documentation. Since you're like the first person ever to use my branch, it hasn't yet been a priority, but now that you're here it is. There are two options; either a) I can try to do this automatically by using jsdoc or I b) can just put all the existing documentation in a wiki. I'm worried about the latter not supporting version upgrades. But the former is at least a couple full days of boring programming work for me :(

    You've so far mentioned 2 discrepancies. Both are from the "convenience" layer. For example:

    /**
     * Create a blob from a buffer
     *
     * @param {Buffer} buffer
     * @param {Function} callback
     */
    var oldCreateBlobFromBuffer = Repo.prototype.createBlobFromBuffer;
    Repo.prototype.createBlobFromBuffer = function(buffer, callback) {
      oldCreateBlobFromBuffer.call(this, buffer, buffer.length, callback);
    };

    Now, that said, if you want to muck with the documentation generator it's on the gh-pages branch https://github.com/nodegit/nodegit/tree/gh-pages . It's all from the params.json which is just v0.18.json from wip -- i.e., it's the same thing that's driving the codegen!

  3. nkallen commented on Sep 5, 2013

    Contributor

    OK I just made a major change to the documentation generator. In theory it should merge the two kinds of documentation together. I've verified it works for http://www.nodegit.org/nodegit/#Repo-createCommit and http://www.nodegit.org/nodegit/#Repo-createBlobFromBuffer . I'm sure I broke some other stuff in the meantime, but this seems like a better way forward.

  4. FrozenCow commented on Sep 5, 2013

    ContributorAuthor

    Awesome! Just out of interest, how are you generating dox.json now?

  5. nkallen commented on Sep 5, 2013

    Contributor

    Install this https://github.com/visionmedia/dox

    % cat lib/*.js | dox > dox.json
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL