@@ -7,6 +7,12 @@ var starterkit_manager = function (config) {
7
7
util = require ( './utilities' ) ,
8
8
paths = config . paths ;
9
9
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
+ */
10
16
function loadStarterKit ( starterkitName , clean ) {
11
17
try {
12
18
var kitPath = path . resolve (
@@ -43,9 +49,9 @@ var starterkit_manager = function (config) {
43
49
}
44
50
45
51
/**
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
49
55
*/
50
56
function listStarterkits ( ) {
51
57
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) {
77
83
78
84
}
79
85
86
+ /**
87
+ * Detects installed starter kits
88
+ *
89
+ * @return {array } List of starter kits installed
90
+ */
80
91
function detectStarterKits ( ) {
81
92
var node_modules_path = path . join ( process . cwd ( ) , 'node_modules' ) ;
82
93
var npm_modules = fs . readdirSync ( node_modules_path ) . filter ( function ( dir ) {
0 commit comments