diff --git a/ui (gen4)/doc/NOTES b/ui (gen4)/doc/NOTES new file mode 100755 index 00000000..4c2fd4fb --- /dev/null +++ b/ui (gen4)/doc/NOTES @@ -0,0 +1,39 @@ + +Modules and RequireJS +===================== + +Most of the system is loaded via browser context RequireJS loader, in +node/nw context node-specific stuff is loaded with a second node-enabled +RequireJS instance or node require. + +This is done to: + - Minimize the difference between pure browser, nw and node + versions + - Enable devtools introspection on most modules. + NOTE: his is mostly due to the inability to view the node + context in nw.js devtools, when this is resolved this + point should be revised. + + +Different loaders: +------------------ + +There are two RequireJS instances present in most contexts in nw.js +within the define(..) runner: + - require(..) + Pure browser RequireJS instance, used to load local + modules. + + - requirejs(..) + Node-enabled RequireJS instance, used to load node + modules. + This is needed as the above require(..) overloads the + node native loader. + +The future: +----------- + +This seems a bit confusing, so at least the naming convention should be +revised. + + diff --git a/ui (gen4)/features/cli.js b/ui (gen4)/features/cli.js index f7b20b26..8b21973f 100755 --- a/ui (gen4)/features/cli.js +++ b/ui (gen4)/features/cli.js @@ -55,12 +55,14 @@ var CLIActions = actions.Actions({ return this.loadImages(path) .then(function(){ + // save base index... that.saveIndex(path) + // make the previews... that.makePreviews('all') //that.readAllMetadata() - // + that .sortImages() // XXX for some reason this is not running from cli diff --git a/ui (gen4)/lib/tasks.js b/ui (gen4)/lib/tasks.js index 1b5ab68d..5c73c673 100755 --- a/ui (gen4)/lib/tasks.js +++ b/ui (gen4)/lib/tasks.js @@ -15,12 +15,15 @@ var object = require('lib/object') /*********************************************************************/ +var QueuePrototype = Object.create(actions.MetaActions) + + // XXX need a mechanism to either queue chains of tasks that depend on // on the previous results or a way to delay a task until what it // needs is finished... // XXX add fatal .abort(..) of queue... var QueueActions = -module.QueueActions = actions.Actions({ +module.QueueActions = actions.Actions(QueuePrototype, { config: { 'running-pool-size': 8, // XXX at this point these is ignored...