Module pattern is now implemented via templating
Previously two modules were defined, Layout.js, which is the internal implementation, and main.js, which depended on Layout.js and performed the fill / extract functionality required for a public JavaScript API. This simplifies the implementation by just exposing a single UMD module by directly including Layout.js within the module wrapper. Fixes #103
This commit is contained in:
@@ -11,14 +11,15 @@
|
||||
module.exports = factory();
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.returnExports = factory();
|
||||
root.computeLayout = factory();
|
||||
}
|
||||
}(this, function () {
|
||||
var layout = require('./Layout.js');
|
||||
// @@include('./Layout.js')
|
||||
|
||||
return function(node) {
|
||||
node = layout.fillNodes(node);
|
||||
layout.computeLayout(node);
|
||||
node = layout.extractNodes(node);
|
||||
node = computeLayout.fillNodes(node);
|
||||
computeLayout.computeLayout(node);
|
||||
node = computeLayout.extractNodes(node);
|
||||
return node;
|
||||
};
|
||||
}));
|
Reference in New Issue
Block a user