@@ -4,6 +4,16 @@ const fs = require('fs');
44const settings = require ( '../settings' ) ;
55const utils = require ( '../utils' ) ;
66
7+ /**
8+ * Run the prompts to get the details for the project
9+ * @param {Object } defaults
10+ * @param {String } defaults.projectName The default name for the project
11+ * @param {String } defaults.version The default version for the project
12+ * @param {String } defaults.license The default license for the project
13+ * @param {String } defaults.gitUserName The git username setup for the project
14+ * @param {String } defaults.gitUserEmail The git username setup for the project
15+ * @return {Promise }
16+ */
717async function getProjectDetails ( defaults ) {
818 return inquirer . prompt ( [
919 {
@@ -89,24 +99,30 @@ async function getProjectDetails(defaults) {
8999 ] ) ;
90100}
91101
102+ /**
103+ * Run the prompts to get the details for the remote git
104+ * @return {Promise }
105+ */
92106async function getGitRemoteDetails ( ) {
93107 return inquirer . prompt ( [
94108 {
95109 type : 'input' ,
96110 name : 'git.sshUrl' ,
97111 message : 'What git remote will you be using?' ,
98- default : '' , // TODO include here the default github url
99112 } ,
100113
101114 {
102115 type : 'input' ,
103116 name : 'issueTracker' ,
104117 message : 'Where is your issue tracker?' ,
105- default : '' , // TODO include here the default github url
106118 } ,
107119 ] ) ;
108120}
109121
122+ /**
123+ * Run the prompts to geth the path for the auth file
124+ * @return {Promise }
125+ */
110126async function getAuthFile ( ) {
111127 return inquirer . prompt ( [
112128 {
@@ -125,6 +141,11 @@ async function getAuthFile() {
125141 ] ) ;
126142}
127143
144+ /**
145+ * Run the prompts to get the github user
146+ * @param {String } user The current user on the auth file
147+ * @return {Promise }
148+ */
128149async function getGithubUser ( user ) {
129150 return inquirer . prompt ( [
130151 {
@@ -136,6 +157,12 @@ async function getGithubUser(user) {
136157 ] ) ;
137158}
138159
160+ /**
161+ * Run the prompts to get the github token
162+ * @param {String } user The current github user on the auth file
163+ * @param {String } token The current github user on the auth file
164+ * @return {Promise }
165+ */
139166async function getAuthToken ( user , token ) {
140167 return inquirer . prompt ( [
141168 {
@@ -147,6 +174,10 @@ async function getAuthToken(user, token) {
147174 ] ) ;
148175}
149176
177+ /**
178+ * Run the prompt to confirm if the user wants to update the token
179+ * @return {Promise }
180+ */
150181async function confirmUpdateToken ( ) {
151182 return inquirer . prompt ( [
152183 {
0 commit comments