First draft of the new generator UI complete

- Switched from inquirer to blessed.
This commit is contained in:
Sahat Yalkabov
2014-05-11 08:10:00 -04:00
parent 8f4213e846
commit 462984b7ca
2 changed files with 60 additions and 3 deletions

View File

@ -54,15 +54,15 @@
"twit": "^1.1.14",
"uglify-js": "^2.4.13",
"underscore": "^1.6.0",
"validator": "^3.11.0",
"validator": "^3.11.0"
},
"devDependencies": {
"blessed": "0.0.29",
"chai": "^1.9.1",
"colors": "^0.6.2",
"inquirer": "^0.4.1",
"mocha": "^1.18.2",
"mstring": "^0.1.2",
"supertest": "^0.11.0",
"workshop": "0.0.0"
"supertest": "^0.11.0"
}
}

57
setup.js Normal file
View File

@ -0,0 +1,57 @@
var blessed = require('blessed')
var screen = blessed.screen({
});
var list = blessed.list({
parent: screen,
padding: { top: 2 },
mouse: true,
keys: true,
vi: true,
fg: 'white',
bg: 'blue',
selectedFg: 'blue',
selectedBg: 'white',
items: [
'» Add/Remove Authentication',
'» Change Email Service',
'» Enable Socket.IO',
'» Enable Node.js Cluster',
'» Exit'
]
});
list.append(blessed.Text({
align: 'center',
fg: 'blue',
bg: 'white',
content: 'Hackathon Starter (c) 2014'
}));
list.append(blessed.Text({
bottom: 0,
fg: 'white',
bg: 'blue',
content: '<Up/Down> moves; <Enter> selects'
}));
screen.key('q', function() {
process.exit(0);
});
//var check = blessed.checkbox({
// parent: form,
// keys: true,
// left: 0,
// top: 0,
// width: 30,
// height: 4,
// bg: 'blue',
// content: ' » Hello or cancel?'
//});
screen.render();