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:
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:
- It searches for JavaScript files in the specified directory and its subdirectories.
- It parses the comments from each JavaScript file using
CommentsUtil.getCommentsFromFile()
. - It processes the comments to extract module information and updates the module and category data structures accordingly.
- If a default module is defined, it adds the module and its documentation to the appropriate category or the default category.
- It generates the documentation directory and files using the
Writer
utility. - 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:
.convertToCamelCase('hello world') => 'helloWorld'
StringUtil.convertToCamelCase('hello-world') => 'helloWorld'
StringUtil.convertToCamelCase('hello_world') => 'helloWorld'
StringUtil.convertToCamelCase('helloWorld') => 'helloWorld'
StringUtil.convertToCamelCase('hello') => 'hello' StringUtil
unknown
[other]
Description: This method will convert a string to camel toUpperCase
Examples:
.convertToCamelCase('hello world') => 'helloWorld'
StringUtil.convertToCamelCase('hello-world') => 'helloWorld'
StringUtil.convertToCamelCase('hello_world') => 'helloWorld'
StringUtil.convertToCamelCase('helloWorld') => 'helloWorld'
StringUtil.convertToCamelCase('hello') => 'hello' StringUtil