Globals

global constructs

path_1

[variable]

moveTranslatedFilesToOutputDir

[function]

fixTranslatedFilesStructureInOutputDir

[function]

findSubFolderWithMatchingName

[function]

Params:

Name Description
h The path to the folder to search for the subfolder in.

moveDirContents

[function]

Params:

Name Description
r The directory to move files and folders from.

mergePathsForTranslatedFiles

[function]

Description: This is necessary because the Crowdin CLI creates a folder for each language and places the translated files within that folder. This function will move the files from the language folder to the same level as the original files.

fixFileExtensionsForTranslatedFiles

[function]

Description: The generated crowdin files have this file extension pattern: .. The problem here is that the can be <index.md> instead of ‘index’. This will make the generated file to be <index.md>.. This function will fix the file name to be .. so it’ll be <index..>

getJSFilesFromDirectory

[function]

Description: This function recursively traverses the specified directory and its subdirectories to find JavaScript files (.js). It starts by checking each item in the directory. If the item is a directory, it recursively calls itself to search for JavaScript files within that directory. If the item is a JavaScript file, it adds the file path to an array of found JavaScript files.

generateDoc

[function]

Description: Starts the documentation generation process.

This function initiates the documentation generation process by performing the following steps:

  1. It searches for JavaScript files in the specified directory and its subdirectories.
  2. It parses the comments from each JavaScript file using CommentsUtil.getCommentsFromFile().
  3. It processes the comments to extract module information and updates the module and category data structures accordingly.
  4. If a default module is defined, it adds the module and its documentation to the appropriate category or the default category.
  5. It generates the documentation directory and files using the Writer utility.
  6. Finally, it logs a message indicating that the documentation generation process is complete.

This function serves as the entry point for generating documentation for JavaScript files.

unknown

[other]

unknown

[other]

Description: This method will convert a string to camel toUpperCase

Examples:

StringUtil.convertToCamelCase('hello world') => 'helloWorld'
      StringUtil.convertToCamelCase('hello-world') => 'helloWorld'
      StringUtil.convertToCamelCase('hello_world') => 'helloWorld'
      StringUtil.convertToCamelCase('helloWorld') => 'helloWorld'
      StringUtil.convertToCamelCase('hello') => 'hello'

unknown

[other]

Description: This method will convert a string to camel toUpperCase

Examples:

StringUtil.convertToCamelCase('hello world') => 'helloWorld'
      StringUtil.convertToCamelCase('hello-world') => 'helloWorld'
      StringUtil.convertToCamelCase('hello_world') => 'helloWorld'
      StringUtil.convertToCamelCase('helloWorld') => 'helloWorld'
      StringUtil.convertToCamelCase('hello') => 'hello'