Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Added headless mode functionality #23

Merged
merged 9 commits into from
Oct 30, 2017

Conversation

james-wallis
Copy link
Contributor

@james-wallis james-wallis commented Oct 26, 2017

I've added a headless mode functionality to the generator so that the user is able to use this generator without the prompts.
The user must supply a --headless option to the end of the yo nodeserver command. This will create a project using the given defaults much alike using the prompt without entering any values.

To create a custom project the user can do something like:
yo nodeserver --headless='{"name":"projectname","services":["watson conversation","cloudant"]}'

I've updated the readme to reflect the added feature as well as listing out which services will be valid to make using headless mode easier.

Testing: I've added three tests.

  1. Checks that the project is being created correctly in headless mode.
  2. Checks the swagger file name aspect.
  3. Checks the services being added.
    IMO I don't think we need to add anymore testing as I have shown that the behaviour of headless mode is the same as using prompts.

Would recommend that you viewed the commits with ?w=1 added to the end of the url as my atom has removed a lot of whitespace.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 85.075% when pulling 8fa4c09 on jamesemwallis:development into 12a8bf3 on ibm-developer:development.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 85.075% when pulling 17f75e3 on jamesemwallis:development into 12a8bf3 on ibm-developer:development.

@cvignola cvignola self-requested a review October 30, 2017 14:15
@cvignola cvignola merged commit 2b0a4a5 into ibm-developer:development Oct 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants