bin/cli.js
function askForSave(conf) {
    return function(next, project) {
        process.stdout.write('Do you yant to save this project combinaison: (y/N)');
        utils.readInput(function(input) {
            if (input == 'y') {
                process.stdout.write('Name of this combinaison: ');
                utils.readInput(function(input) {
                    conf.projects ? '': conf.projects = [];
                    project.name = input;
                    conf.projects.push(project);
                    config.write(conf, function(err) {
                        if (err) throw err;
                        console.log('ok. You can add time to this combinaison with intervals --project '+ input);
                        next();
                    })
                });
            } else {
                next();
            }
        });
    }
}
function askForSave(conf) {
    return function(next, project) {
        process.stdout.write('Do you yant to save this project combinaison: (y/N)');
        utils.readInput(function(input) {
            if (input == 'y') {
                process.stdout.write('Name of this combinaison: ');
                utils.readInput(function(input) {
                    conf.projects ? '': conf.projects = [];
                    project.name = input;
                    conf.projects.push(project);
                    config.write(conf, function(err) {
                        if (err) throw err;
                        console.log('ok. You can add time to this combinaison with intervals --project '+ input);
                        next();
                    })
                });
            } else {
                next();
            }
        });
    }
}
function askForSave ( conf ) { return function ( next , project ) { process . stdout . write ( 'Do you yant to save this project combinaison: (y/N)' ) ; utils . readInput ( function ( input ) { if ( input == 'y' ) { process . stdout . write ( 'Name of this combinaison: ' ) ; utils . readInput ( function ( input ) { conf . projects ? '' : conf . projects = [ ] ; project . name = input ; conf . projects . push ( project ) ; config . write ( conf , function ( err ) { if ( err ) throw err ; console . log ( 'ok. You can add time to this combinaison with intervals --project ' + input ) ; next ( ) ; } ) } ) ; } else { next ( ) ; } } ) ; } }
Ask user to save the project
Ask user to save the project