Giter Club home page Giter Club logo

vrodoc's Introduction

Tutorial Video coming soon...

vRODoc (2)

Convert vRO Actions to JSDoc to Github/Gitlab Pages

Orange Ebb and Flow Abstract LinkedIn Banner

This mechanism allows vRO Actions to be converted to JSDoc annotated Pure Javascript Code without even using any JSdoc annotation inside vRO. This mechanism intelligently fetches the funtionName, version, inputs and outputs from the vRO Actions itself and create JSDoc comments on basis of it.

Read this article: https://www.linkedin.com/pulse/vrodoc-convert-vro-actions-js-annotated-javascript-post-goyal

vrodoc_process - Copy

Installation

  • Just run this command in your Powershell
Install-Script -Name vRODoc
  • or you can also download this repo directly

Prerequisite

  • Install npm (download node.js installer) and jsdoc (npm install jsdoc)
  • Connection to vRO Server where vRO action package is created (ping fqdn-of-vro-server)
  • Any Recent version of Powershell

How to run

  • Go to the downloaded vrodoc_script.ps1 file and edit it to pass the connection related parameters inside it.
  • Open Powershell editor at that location and just execute it using .\exact_filename_of_vRODoc.ps1

Example

Let's say you created a simple action in vRO. Now you want that action to be documented. vRODoc has the capability to convert your action into a pure JS code with JSDoc annotations as you can see in the comments of this below mentioned JS code nd then will convert it into a .html page that will be a part of your JSDoc website.

/**
 * @function getAllDesktopsForAUserInPool
 * @version 1.8.12
 * @param {string} poolName 
 * @param {string} username 
 * @returns {string}
 */
funtion getAllDesktopsForAUserInPool(poolName,userName){
     var DAConfiguration = System.getModule("com.mayank.actions").getDAConfigurationElement();
     var podConfiguration = System.getModule("com.mayank.actions").getPodConfigurationElement();
     var daUser = System.getModule("com.mayank.actions").getDA();
     var podAlias = System.getModule("com.vmware.library.view.configuration").getDefaultOrFirstPod(DAConfiguration, daUser);
     var machine = System.getModule("com.vmware.library.view.assignment").getAssignedMachine(poolName, podAlias, username, podConfiguration);
     if (machine)
          return machine.name;
};
Here, all the JSDoc comments are derived from vRO Action itself. There is no additional metadata/comment ever added while this vRO action was formed. Hence, it gives us a out-of-the-box funtionality.

Contributing

If you find any issue with the current scripts, you can create a issue.

If you have any other scripts that you want to share, you can create a pull request.

SHARINGISCARING

vrodoc's People

Contributors

imtrinity94 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

modernappsninja

vrodoc's Issues

ModernAppsNinja Org shutting down

Hi @imtrinity94 this message is being sent because there is a fork of this repository hosted on the ModernAppsNinja github org.

We will be decommissioning the ModernAppsNinja Github org over the next few months and all content will be removed. If you created the fork, please be sure you have saved any content associated with the fork on the modernappsninja org, as it will be removed.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.