-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
The bower distributed delorean does not work with Require.js
First problem is require('events').EventEmitter:
module.exports = requirements = {
// DeLorean uses **Node.js native EventEmitter** for event emittion
EventEmitter: require('events').EventEmitter,
// and **es6-promise** for Deferred object management.
Promise: require('es6-promise').Promise
};
But the module is defined as:
module.exports = EventEmitter
So I think in the injector it should just be require('event') right?
Second problem is in the injector:
// This library needs to work for Browserify and also standalone.
// If DeLorean is defined, it means it's called from the browser, not
// the browserify.
if (typeof DeLorean !== 'undefined') {
for (var requirement in requirements) {
DeLorean.Flux.define(requirement, requirements[requirement]);
}
}
But when used in the browser with Require.js, DeLorean is undefined because:
if (typeof define === 'function' && define.amd) {
define([], function () {
return DeLorean;
});
} else {
window.DeLorean = DeLorean;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels