From 7786549de6df0af5c7e18b9a96ab6c9d6f70f7c7 Mon Sep 17 00:00:00 2001 From: Stefano Pezzino Date: Fri, 30 Sep 2016 22:02:29 -0400 Subject: [PATCH] #490 Add proper javadoc comments to core/lib/starterkit_manager.js --- core/lib/starterkit_manager.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/core/lib/starterkit_manager.js b/core/lib/starterkit_manager.js index 89ef77ecf..3dec08115 100644 --- a/core/lib/starterkit_manager.js +++ b/core/lib/starterkit_manager.js @@ -7,6 +7,12 @@ var starterkit_manager = function (config) { util = require('./utilities'), paths = config.paths; + /** + * Loads npm module identified by the starterkitName parameter. + * + * @param starterkitName {string} Kit name + * @param clean {boolean} Indicates if the directory should be cleaned before loading + */ function loadStarterKit(starterkitName, clean) { try { var kitPath = path.resolve( @@ -43,9 +49,9 @@ var starterkit_manager = function (config) { } /** - * @func listStarterkits - * @desc Fetches starterkit repos from GH API that contain 'starterkit' in their name for the user 'pattern-lab' - * @returns {Promise} Returns an Array<{name,url}> for the starterkit repos + * Fetches starterkit repos from GH API that contain 'starterkit' in their name for the user 'pattern-lab' + * + * @return {Promise} Returns an Array<{name,url}> for the starterkit repos */ function listStarterkits() { return fetch('https://api.github.com/search/repositories?q=starterkit+in:name+user:pattern-lab&sort=stars&order=desc', { @@ -77,6 +83,11 @@ var starterkit_manager = function (config) { } + /** + * Detects installed starter kits + * + * @return {array} List of starter kits installed + */ function detectStarterKits() { var node_modules_path = path.join(process.cwd(), 'node_modules'); var npm_modules = fs.readdirSync(node_modules_path).filter(function (dir) {