Comparing version 0.1.0 to 0.1.2
#!/usr/bin/env node | ||
process.chdir(__dirname); | ||
var cli = require('./cli'); |
@@ -0,3 +1,3 @@ | ||
var async = require('async'); | ||
var readline = require('readline'); | ||
var q = require('./questions'); | ||
var rl = readline.createInterface({ | ||
@@ -8,2 +8,3 @@ input: process.stdin, | ||
}); | ||
var questions = require('./questions.json'); | ||
var answers = { | ||
@@ -33,10 +34,28 @@ profile: { | ||
process.stdout.write("Welcome to the persona creator!\n"); | ||
process.stdout.write("Welcome to the persona creator!\n\n"); | ||
q.section("1.1 - Demographic Profile"); | ||
q.question("What is the name of your persona?", rl, function (a) { | ||
answers.profile.demo.name = a; | ||
q.question("What is the age of your persona?", rl, function (a) { | ||
answers.profile.demo.age = a; | ||
}); | ||
async.eachSeries(questions.q, function (e, cb) { | ||
if (e.type === "s") { | ||
process.stdout.write(e.name + "\n"); | ||
cb(); | ||
} else if (e.type === "q") { | ||
rl.question(e.name + " ", function (a) { | ||
if (e.cat) { | ||
if (e.sub) { | ||
if (e.to) { | ||
answers[e.cat][e.sub][e.to] = a; | ||
cb(); | ||
} else { | ||
answers[e.cat][e.sub] = a; | ||
cb(); | ||
} | ||
} else { | ||
answers[e.cat] = a; | ||
cb(); | ||
} | ||
} | ||
}); | ||
} | ||
}, function (err) { | ||
if (err) throw err; | ||
}); |
{ | ||
"name": "persona", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"description": "create personas from the command line", | ||
@@ -24,5 +24,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"bluebird": "^2.3.2", | ||
"async": "^0.9.0", | ||
"commander": "^2.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2696
103
+ Addedasync@^0.9.0
+ Addedasync@0.9.2(transitive)
- Removedbluebird@^2.3.2
- Removedbluebird@2.11.0(transitive)