1. #231
    Sencha User renku's Avatar
    Join Date
    Feb 2009
    Location
    Estonia
    Posts
    437
    Vote Rating
    17
    renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold

      0  

  2. #232
    Sencha User renku's Avatar
    Join Date
    Feb 2009
    Location
    Estonia
    Posts
    437
    Vote Rating
    17
    renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold

      0  

    Default


    JSDuck 5.0 beta 2 released

    This beta should now be quite close to the final 5.0. So I encourage you to try out.

    In addition to the new tags system the beta 2 considerably changes the layout of exported JSON:

    The largest change is how class members get listed. In 4.x they were split into "members" and "statics" and inside that there were subsections for each member type:

    Code:
    {
      "tagname": "class",
      "members": {"method": [...], "event": [...]},
      "statics": {"method": [...], "event": [...]}
    }
    In 5.0 this has been changed to simple array:

    Code:
    {
      "tagname": "class",
      "members": [...],
    }
    And it's up to you to filter out members by type (using the "tagname" field) or separate instance and static members (using the "static" field).

    Inside member hashes there is no "meta" field any more. Instead all these meta-fields are now available directly inside the member hash.

    In 4.x:

    Code:
    {"tagname": "method", "meta": {"protected": true}}
    In 5.x:

    Code:
    {"tagname": "method", "protected": true}
    Also, the fields "component", "subclasses", "superclasses", "mixedInto" and "parentMixins" have been completely removed from the exported data. They were really only there because JSDuck itself happened to need them. But they're gone now. So if you were using these, you'll now have to navigate the inheritance tree by yourself to extract this data.

    On top of that, a lot of work has gone into the @inheritdoc system. There's now a new @localdoc tag for marking non-inheritable documentation. Overall the new docs inheriting system should behave more predictably then than the old. (JSDuck documentation still needs to be updated in this regard.)

    Lastly, there's now a neat way to scope warnings by path. Say, you're building your app on top of old Ext 3, so you run JSDuck like this:

    Code:
    $ jsduck ext3/src myapp/src --output somedir
    But Ext3 is an old code-base and JSDuck will give you lots of warnings. You could specify --warnings=-all, but now you won't get warnings for your own project too. In JSDuck 5 you can now say --warnings=-all:ext3/src and only the warnings triggered by files in ext3/src will be turned off.

    To install the beta, run:

    Code:
    $ gem install jsduck --pre
    See the changelog for additional details.
    Last edited by renku; 3 Apr 2013 at 10:00 AM. Reason: grammar

  3. #233
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    maheshjagadeesan is on a distinguished road

      0  

    Default Integration with Jenkins

    Integration with Jenkins


    Has anyone managed to get doc generation integrated with Hudson / Jenkins? Or even from a shell script?

  4. #234
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    aspasojevic is on a distinguished road

      0  

    Default


    Quote Originally Posted by maheshjagadeesan View Post
    Has anyone managed to get doc generation integrated with Hudson / Jenkins? Or even from a shell script?
    I did it with shell script which is added to crontab.

    Shell script doing this:
    - updating the code from SVN
    - run jsduck to create documentation

    there is source for jsduck.sh and you make changes for your usage:

    Code:
    #!/bin/sh
    
    
    cd /root/PROJECTS
    
    
    svn update project1-ui
    svn update project2-ui
    
    
    jsduck --config config.json --output /var/www/html/jsdocs 2>&1
    Also there is source of config.json file which is used in this shell script and it is in same folder where is shell script (/root/PROJECTS):

    Code:
    {
        "--": [
            "project1-ui/src/main/webapp/scripts/src",
            "project2-ui/src/main/webapp/scripts/src"
        ]
    }
    Also here is crontab line for every day job at 5:00AM:

    Code:
    0 5 * * * /root/PROJECTS/jsduck.sh >/dev/null 2>&1

    All of this is done on CentOS 6 host.


    PS: You can use this script in hudson/jenkins too as POST build step and shell execution.


    Regards,
    Aleksandar

  5. #235
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    maheshjagadeesan is on a distinguished road

      0  

    Default


    Thanks for your reply, Aleksandar. My situation was a bit different: I needed to run JSDuck as part of a continuous build process from Jenkins. The problem I faced was that JSDuck wasn't getting the required Shell environment ($PATH, $GEM_PATH, etc. were not set correctly). So, to work around it, I created the following shell script:

    Code:
    #!/bin/bash
    source /usr/local/rvm/environments/ruby-1.9.3-p392
    /usr/local/rvm/gems/ruby-1.9.3-p392/bin/jsduck "$@"
    and called this from my build.xml, passing in command-line parameters using the <arg> tag (note: I did not use a config file, as it was not appropriate for my requirement).

    Note that I had to pass parameters to jsduck using "$@" as simply using $* or "$*" just wouldn't work (the value of my --title parameter was a string with spaces).

  6. #236
    Sencha User renku's Avatar
    Join Date
    Feb 2009
    Location
    Estonia
    Posts
    437
    Vote Rating
    17
    renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold

      0  

    Default


    JSDuck 4.9 released

    While JSDuck 5 is still in beta, 4.8 and 4.9 have been released in the mean time.

    New features to note:

    - The main page of API docs now contains a detailed list of new classes and members introduced in this version. Gone is the mess of large and small stars behind class names - only completely new classes are now labeled with a small star icon.

    - --warnings-exit-nonzero option to make JSDuck exit with non-zero code when warnings present. Useful to ensure warning-less build when running JSDuck in continuous integration.

    - --color and --no-color options to force colorized terminal output.

    See the changelog for few more details.

  7. #237
    Sencha User SimoAmi's Avatar
    Join Date
    Oct 2008
    Location
    New York
    Posts
    119
    Vote Rating
    3
    SimoAmi will become famous soon enough

      0  

    Default scanning subdirectories

    scanning subdirectories


    I'm noticing that JSDuck does not scan subdirectories, forcing explicit inclusion of every path and its nested content. Is that the expected behavior?

    Can we either support ant-style wildcards * (all files under the specified directory) and ** (all files and the specified directory and its subdirectories), or add an additional flag to instruct JSDuck to scan subdirectories.

    Whichever option is easier to implement would works.

    Thank you!

  8. #238
    Sencha User renku's Avatar
    Join Date
    Feb 2009
    Location
    Estonia
    Posts
    437
    Vote Rating
    17
    renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold

      0  

    Default


    JSDuck does in fact scan subdirectories. Just pass the directory as input and it will include all the .js files inside there:

    Code:
    $ jsduck somedir/ --output out/

  9. #239
    Sencha User SimoAmi's Avatar
    Join Date
    Oct 2008
    Location
    New York
    Posts
    119
    Vote Rating
    3
    SimoAmi will become famous soon enough

      0  

    Default


    Quote Originally Posted by renku View Post
    JSDuck does in fact scan subdirectories.
    Silly me. Of course it does. I had not specified The full namespace with the @class annotation.
    Thanks,

  10. #240
    Sencha User renku's Avatar
    Join Date
    Feb 2009
    Location
    Estonia
    Posts
    437
    Vote Rating
    17
    renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold renku is a splendid one to behold

      0  

    Default


    JSDuck 4.10 released

    This version improves internal linking within guides. Previously one couldn't create links to named anchors within a guide as that broke the docs app #! URL scheme. Now all links and anchors get automatically transformed so no conflicts arise. See Guides chapter in JSDuck wiki for more details.

    See the changelog for other changes.