mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
fixed cli problem (hackish) and found a bug in core.ImageGridFeatures.buildFeatureList() (w.o. args)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
11b84d736e
commit
ae43366f9f
@ -30,7 +30,8 @@ require('features/meta')
|
||||
require('features/experimental')
|
||||
require('features/demo')
|
||||
|
||||
if(window.nodejs != null){
|
||||
// node features...
|
||||
if(typeof(window) == 'undefined' || window.nodejs != null){
|
||||
require('features/filesystem')
|
||||
require('features/cli')
|
||||
}
|
||||
|
||||
@ -98,7 +98,11 @@ module.CLI = core.ImageGridFeatures.Feature({
|
||||
that.features.features.length,
|
||||
that.features.features.join('\n '))
|
||||
})
|
||||
// XXX make this applicable features...
|
||||
.option('laf, --list-available-features', 'list available features', function(){
|
||||
// XXX bug, this hangs....
|
||||
//console.log(core.ImageGridFeatures.buildFeatureList())
|
||||
|
||||
var f = core.ImageGridFeatures.features
|
||||
console.log('Features available (%d):\n ',
|
||||
f.length,
|
||||
@ -121,14 +125,7 @@ module.CLI = core.ImageGridFeatures.Feature({
|
||||
// and after setup...
|
||||
.option('sm, --setup-minimal', 'setup minimal features', function(){
|
||||
// load features we might need...
|
||||
// XXX require js loads these at the root...
|
||||
var location = require('features/location')
|
||||
var history = require('features/history')
|
||||
var app = require('features/app')
|
||||
var marks = require('features/ui-marks')
|
||||
var filesystem = require('features/filesystem')
|
||||
var metadata = require('features/metadata')
|
||||
var experimental = require('features/experimental')
|
||||
var all = require('features/all')
|
||||
|
||||
// extend the current instance to a minimal non-ui
|
||||
// state...
|
||||
|
||||
@ -6,6 +6,10 @@
|
||||
|
||||
define(function(require){ var module = {}
|
||||
|
||||
if(typeof(window) == 'undefined'){
|
||||
return
|
||||
}
|
||||
|
||||
//var DEBUG = DEBUG != null ? DEBUG : true
|
||||
|
||||
var object = require('lib/object')
|
||||
|
||||
@ -7,6 +7,10 @@
|
||||
|
||||
define(function(require){ var module = {}
|
||||
|
||||
if(typeof(window) == 'undefined'){
|
||||
return
|
||||
}
|
||||
|
||||
//var DEBUG = DEBUG != null ? DEBUG : true
|
||||
|
||||
// XXX is this correct...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user