mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
minor tweaking and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a6c80ddbc9
commit
41cf1c4216
39
ui (gen4)/doc/NOTES
Executable file
39
ui (gen4)/doc/NOTES
Executable 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.
|
||||||
|
|
||||||
|
|
||||||
@ -55,12 +55,14 @@ var CLIActions = actions.Actions({
|
|||||||
|
|
||||||
return this.loadImages(path)
|
return this.loadImages(path)
|
||||||
.then(function(){
|
.then(function(){
|
||||||
|
// save base index...
|
||||||
that.saveIndex(path)
|
that.saveIndex(path)
|
||||||
|
|
||||||
|
// make the previews...
|
||||||
that.makePreviews('all')
|
that.makePreviews('all')
|
||||||
|
|
||||||
//that.readAllMetadata()
|
//that.readAllMetadata()
|
||||||
//
|
|
||||||
that
|
that
|
||||||
.sortImages()
|
.sortImages()
|
||||||
// XXX for some reason this is not running from cli
|
// XXX for some reason this is not running from cli
|
||||||
|
|||||||
@ -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
|
// 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
|
// on the previous results or a way to delay a task until what it
|
||||||
// needs is finished...
|
// needs is finished...
|
||||||
// XXX add fatal .abort(..) of queue...
|
// XXX add fatal .abort(..) of queue...
|
||||||
var QueueActions =
|
var QueueActions =
|
||||||
module.QueueActions = actions.Actions({
|
module.QueueActions = actions.Actions(QueuePrototype, {
|
||||||
config: {
|
config: {
|
||||||
'running-pool-size': 8,
|
'running-pool-size': 8,
|
||||||
// XXX at this point these is ignored...
|
// XXX at this point these is ignored...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user