You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current system uses eval(this.exports) to export symbols from a closure.
This does not work correctly when a package is minimised using anything other
than packer.
A new packaging system is required that can survive minification.
Original issue reported on code.google.com by [email protected] on 5 Jan 2010 at 2:01
The text was updated successfully, but these errors were encountered:
The new packaging system will be very similar to the old one. Here is a
template:
base2.exec(function(namespace) {
eval(namespace); // optional
var PI = 3.14;
var Shape = Base.extend({
...
});
var Circle = Shape.extend({
...
});
var Rect = Shape.extend({
...
});
var shapes = new Package({
name: "shapes",
version: "2.0",
exports: {
PI: PI,
Shape: Shape,
Circle: Circle,
Rect: Rect
}
});
});
There will also be base2.require() which will lazy-load other packages/scripts:
base2.require("dom", function(namespace) {
eval(namespace); // optional
// package definition
});
Original issue reported on code.google.com by
[email protected]
on 5 Jan 2010 at 2:01The text was updated successfully, but these errors were encountered: