summaryrefslogtreecommitdiff
path: root/lib/prompts.js
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2014-09-28 18:36:08 +0100
committerprzemyslawpluta <przemekpluta@hotmail.com>2014-09-28 18:36:08 +0100
commit75245d62fdd7230ac3bdb634f26ad0da8826f61f (patch)
treed9156924b6d80fdbf024652ae4184fd5fd37bcfe /lib/prompts.js
parent50b4cf93765ad4a74672baa12f8d59772356aad9 (diff)
downloadmongo-edu-75245d62fdd7230ac3bdb634f26ad0da8826f61f.zip
cleanup
Diffstat (limited to 'lib/prompts.js')
-rw-r--r--lib/prompts.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/prompts.js b/lib/prompts.js
new file mode 100644
index 0000000..0af81e8
--- /dev/null
+++ b/lib/prompts.js
@@ -0,0 +1,44 @@
+/*
+ * mongo-edu
+ *
+ * Copyright (c) 2014 Przemyslaw Pluta
+ * Licensed under the MIT license.
+ * https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
+ */
+
+module.exports = (function build() {
+
+ 'use strict';
+
+ return {
+ savePrompt: [{ type: 'input', name: 'save', message: 'Missing [ --save ] Preset Name', default: '', validate: function(value) {
+ if (value !== '') { return true; }
+ return 'Please enter [ --save ] preset name';
+ }}],
+
+ loadPreset: function loadPreset(data) {
+ return [{ type: 'list', name: 'preset', message: 'Select Preset To Load:', choices: data}];
+ },
+
+ list: [{ type: 'list', name: 'url', message: '', choices: [] }],
+
+ check: [{ type: 'checkbox', message: '', name: 'videos', choices: [],
+ validate: function validate(answer) {
+ if ( answer.length < 1 ) { return 'You must choose at least one option.'; }
+ return true;
+ }
+ }],
+
+ profile: [
+ { type: 'input', name: 'user', message: 'MongoDB Uni User Name', default: '', validate: function(value) {
+ if (value !== '') { return true; }
+ return 'Please enter your MongoDB Uni user name - email address';
+ }},
+ { type: 'password', message: 'MongoDB Uni Password', name: 'password', validate: function(value) {
+ if (value !== '') { return true; }
+ return 'Please enter your MongoDB Uni password';
+ }}
+ ]
+ };
+
+}());