-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert clasp create to inquirer functionality #130
Conversation
Now, if you don't specify a script name, we use inquirer to ask for one. Also added tests for this. Signed-off-by: campionfellin <campionfellin@gmail.com>
index.ts
Outdated
@@ -606,7 +624,7 @@ commander | |||
logError(error, ERROR.CREATE); | |||
}); | |||
}); | |||
}); | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we should also add no-trailing-whitespace (https://palantir.github.io/tslint/rules/no-trailing-whitespace/) to the tslint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Pull Request Test Coverage Report for Build 92
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some nits.
Note, the whole prompting system may change in v2 if we choose something like Vorpal.
index.ts
Outdated
@@ -209,6 +210,16 @@ Did you provide the correct scriptId?`, | |||
UNAUTHENTICATED: 'Error: Unauthenticated request: Please try again.', | |||
}; | |||
|
|||
// Questions (prompts) for clasp create | |||
const createQuestions = [ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[{
index.ts
Outdated
@@ -209,6 +210,16 @@ Did you provide the correct scriptId?`, | |||
UNAUTHENTICATED: 'Error: Unauthenticated request: Please try again.', | |||
}; | |||
|
|||
// Questions (prompts) for clasp create | |||
const createQuestions = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline
index.ts
Outdated
type : 'input', | ||
name : 'title', | ||
message : 'give a script title: ', | ||
default: LOG.UNTITLED_SCRIPT_TITLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add trailing comma.
index.ts
Outdated
@@ -606,7 +624,7 @@ commander | |||
logError(error, ERROR.CREATE); | |||
}); | |||
}); | |||
}); | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Add no-trailing-whitespace and trailing-comma to tslint Fix lint errors Signed-off-by: campionfellin <campionfellin@gmail.com>
Now, if you don't specify a script name, we use inquirer to ask for one.
Also added tests for this.
Signed-off-by: campionfellin campionfellin@gmail.com
Addresses #57
npm run test
succeeds.