Skip to content

Commit 33e5a1a

Browse files
Merge pull request #494 from spezzino/master
#490 Add proper javadoc comments to core/lib/starterkit_manager.js
2 parents c6c6ede + 7786549 commit 33e5a1a

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

core/lib/starterkit_manager.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ var starterkit_manager = function (config) {
77
util = require('./utilities'),
88
paths = config.paths;
99

10+
/**
11+
* Loads npm module identified by the starterkitName parameter.
12+
*
13+
* @param starterkitName {string} Kit name
14+
* @param clean {boolean} Indicates if the directory should be cleaned before loading
15+
*/
1016
function loadStarterKit(starterkitName, clean) {
1117
try {
1218
var kitPath = path.resolve(
@@ -43,9 +49,9 @@ var starterkit_manager = function (config) {
4349
}
4450

4551
/**
46-
* @func listStarterkits
47-
* @desc Fetches starterkit repos from GH API that contain 'starterkit' in their name for the user 'pattern-lab'
48-
* @returns {Promise} Returns an Array<{name,url}> for the starterkit repos
52+
* Fetches starterkit repos from GH API that contain 'starterkit' in their name for the user 'pattern-lab'
53+
*
54+
* @return {Promise} Returns an Array<{name,url}> for the starterkit repos
4955
*/
5056
function listStarterkits() {
5157
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) {
7783

7884
}
7985

86+
/**
87+
* Detects installed starter kits
88+
*
89+
* @return {array} List of starter kits installed
90+
*/
8091
function detectStarterKits() {
8192
var node_modules_path = path.join(process.cwd(), 'node_modules');
8293
var npm_modules = fs.readdirSync(node_modules_path).filter(function (dir) {

0 commit comments

Comments
 (0)