minor cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-31 22:58:41 +03:00
parent 9c905603a9
commit 03c56e9612

View File

@ -36,6 +36,7 @@ module.CLI = core.ImageGridFeatures.Feature({
handlers: [ handlers: [
['start', ['start',
function(){ function(){
// get the arguments...
if(this.runtime == 'nw'){ if(this.runtime == 'nw'){
var argv = requirejs('nw.gui').App.argv var argv = requirejs('nw.gui').App.argv
@ -50,6 +51,7 @@ module.CLI = core.ImageGridFeatures.Feature({
var cli = requirejs('commander') var cli = requirejs('commander')
cli cli
// XXX get the version from config...
.version('0.0.1') .version('0.0.1')
//.usage('[command] [options] ..') //.usage('[command] [options] ..')
@ -68,13 +70,18 @@ module.CLI = core.ImageGridFeatures.Feature({
// list features... // list features...
// XXX make this a core action... (???) // XXX make this a core action... (???)
if(cli.listFeatures){ if(cli.listFeatures){
// excluded...
this.features.excluded.length > 0 this.features.excluded.length > 0
&& console.warn('Features excluded (%d):\n ', && console.warn('Features excluded (%d):\n ',
this.features.excluded.length, this.features.excluded.length,
this.features.excluded.join('\n ')) this.features.excluded.join('\n '))
// not applicable...
console.log('Features not applicable (%d):\n ', console.log('Features not applicable (%d):\n ',
this.features.unapplicable.length, this.features.unapplicable.length,
this.features.unapplicable.join('\n ')) this.features.unapplicable.join('\n '))
// loaded...
console.log('Features loaded (%d):\n ', console.log('Features loaded (%d):\n ',
this.features.features.length, this.features.features.length,
this.features.features.join('\n ')) this.features.features.join('\n '))