minor tweaking and refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-05-28 19:32:30 +03:00
parent a6c80ddbc9
commit 41cf1c4216
3 changed files with 46 additions and 2 deletions

39
ui (gen4)/doc/NOTES Executable file
View File

@ -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.

View File

@ -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

View File

@ -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...