Closed parkm closed 10 years ago
Wait, where are these circular dependencies?
Currently there aren't any but there will be. If we wanted to switch states for instance in the states.js file.
Fixing commits: 563ff80fa8e54a9ae9eace17dd002eb0ca23bdf5 295bf8166fe77f824523f0ee348e485eb5f9e55d bfe13eaf5913fe13097cf521ebd0b60d302e67ff
We're starting to get some circular dependencies which RequireJS does not like. If
a
requiresb
andb
requiresa
then one of them becomes undefined. So we need a way of solving this.I was thinking that instead of using modules we should just require them in the main file, then give them a prefix. This would be easy to do since we're already exporting everything as object literals.
So bpm.js would look something like:
Just realized we can't do this since we can't have private variables.
We need the
bpm
module to be accessible bystates
,objects
, and pretty much everything since it contains a lot of global stuff.