Removed old generator

This commit is contained in:
Sahat Yalkabov
2014-05-13 18:39:25 -04:00
parent 4d85f2ddcd
commit 3d5b716716
2 changed files with 17 additions and 1109 deletions

File diff suppressed because it is too large Load Diff

View File

@ -23,12 +23,28 @@ var home = blessed.list({
items: [ items: [
'» REMOVE AUTHENTICATION PROVIDER', '» REMOVE AUTHENTICATION PROVIDER',
'» CHANGE EMAIL SERVICE', '» CHANGE EMAIL SERVICE',
'» ENABLE SOCKET.IO',
'» ADD NODE.JS CLUSTER SUPPORT', '» ADD NODE.JS CLUSTER SUPPORT',
'» EXIT' '» EXIT'
] ]
}); });
var homeTitle = blessed.text({
parent: screen,
align: 'center',
fg: 'blue',
bg: 'white',
content: 'Hackathon Starter (c) 2014'
});
var footer = blessed.text({
parent: screen,
bottom: 0,
fg: 'white',
bg: 'blue',
tags: true,
content: ' {cyan-fg}<Up/Down>{/cyan-fg} moves | {cyan-fg}<Enter>{/cyan-fg} selects | {cyan-fg}<q>{/cyan-fg} exits'
});
var inner = blessed.form({ var inner = blessed.form({
top: 'center', top: 'center',
left: 'center', left: 'center',
@ -68,14 +84,6 @@ success.on('keypress', function() {
home.remove(success); home.remove(success);
}); });
var socketText = blessed.text({
top: 'top',
bg: 'red',
fg: 'white',
tags: true,
content: 'Add real-time support to your application with Socket.IO.'
});
var clusterText = blessed.text({ var clusterText = blessed.text({
top: 'top', top: 'top',
bg: 'red', bg: 'red',
@ -555,8 +563,6 @@ var emailCancel = blessed.button({
} }
}); });
emailCancel.on('press', function() { emailCancel.on('press', function() {
home.focus(); home.focus();
home.remove(emailForm); home.remove(emailForm);
@ -564,23 +570,6 @@ emailCancel.on('press', function() {
}); });
var homeTitle = blessed.text({
parent: screen,
align: 'center',
fg: 'blue',
bg: 'white',
content: 'Hackathon Starter (c) 2014'
});
var footer = blessed.text({
parent: screen,
bottom: 0,
fg: 'white',
bg: 'blue',
tags: true,
content: ' {cyan-fg}<Up/Down>{/cyan-fg} moves | {cyan-fg}<Enter>{/cyan-fg} selects | {cyan-fg}<q>{/cyan-fg} exits'
});
home.on('select', function(child, index) { home.on('select', function(child, index) {
switch (index) { switch (index) {
case 0: case 0:
@ -593,13 +582,6 @@ home.on('select', function(child, index) {
emailForm.focus(); emailForm.focus();
break; break;
case 2: case 2:
enableSocketIo();
home.append(success);
success.setContent('Socket.IO events have been added at the bottom of {underline}app.js{/underline}. To see a working example take a look at /dashboard. Be sure to run npm install socket.io');
success.focus();
screen.render();
break;
case 3:
addClusterSupport(); addClusterSupport();
home.append(success); home.append(success);
success.setContent('New file {underline}cluster_app.js{/underline} has been created. Your app is now able to use more than 1 CPU by running {underline}node cluster_app.js{/underline}, which in turn spawns multiple instances of {underline}app.js{/underline}'); success.setContent('New file {underline}cluster_app.js{/underline} has been created. Your app is now able to use more than 1 CPU by running {underline}node cluster_app.js{/underline}, which in turn spawns multiple instances of {underline}app.js{/underline}');
@ -611,9 +593,6 @@ home.on('select', function(child, index) {
} }
}); });
screen.render(); screen.render();
@ -640,13 +619,4 @@ for (var i = 0; i < os.cpus().length; i++) {
}); });
fs.writeFileSync('cluster_app.js', fileContents); fs.writeFileSync('cluster_app.js', fileContents);
}
function enableSocketIo() {
var fileContents = multiline(function() {
/*
*/
});
} }