Skip to content
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

Merged
merged 2 commits into from
Apr 23, 2018
Merged

Convert clasp create to inquirer functionality #130

merged 2 commits into from
Apr 23, 2018

Conversation

campionfellin
Copy link
Collaborator

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.
  • Appropriate changes to README are included in PR.

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);
});
});
});
});
Copy link
Collaborator Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@coveralls
Copy link

coveralls commented Apr 23, 2018

Pull Request Test Coverage Report for Build 92

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • 331 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.3%) to 10.8%

Files with Coverage Reduction New Missed Lines %
tests/test.js 12 45.07%
index.js 319 8.07%
Totals Coverage Status
Change from base Build 89: 0.3%
Covered Lines: 97
Relevant Lines: 672

💛 - Coveralls

Copy link
Contributor

@grant grant left a 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 = [
{
Copy link
Contributor

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 = [
Copy link
Contributor

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
Copy link
Contributor

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);
});
});
});
});
Copy link
Contributor

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>
@grant grant merged commit e16a51f into google:master Apr 23, 2018
@campionfellin campionfellin deleted the clasp-create-inquirer branch April 23, 2018 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants