lib/commands.js
function(type) {
		//define if put type is present in config
		if (config.moduleTypes.indexOf(type) > -1) {
            config.moduleType = type;
            fs.writeFile(path.resolve(__dirname, 'config.json'), JSON.stringify(config, null, 4), 'utf8', function (err) {
                if (err) {
                    return console.log(err);
                }
            });
		} else {
			return console.log('Wrong type, available types: %j', config.moduleTypes);
		}
	}
function(type) {
		//define if put type is present in config
		if (config.moduleTypes.indexOf(type) > -1) {
            config.moduleType = type;
            fs.writeFile(path.resolve(__dirname, 'config.json'), JSON.stringify(config, null, 4), 'utf8', function (err) {
                if (err) {
                    return console.log(err);
                }
            });
		} else {
			return console.log('Wrong type, available types: %j', config.moduleTypes);
		}
	}
function ( type ) { //define if put type is present in config if ( config . moduleTypes . indexOf ( type ) > - 1 ) { config . moduleType = type ; fs . writeFile ( path . resolve ( __dirname , 'config.json' ) , JSON . stringify ( config , null , 4 ) , 'utf8' , function ( err ) { if ( err ) { return console . log ( err ) ; } } ) ; } else { return console . log ( 'Wrong type, available types: %j' , config . moduleTypes ) ; } }
Sets module type
@param {string} type
Sets module type