Open bpatram opened 8 years ago
What I ended up adding is a relation type store, which maps the relation types to their names. 'HasMany' => Relation.HasMany and the same idea for HasOne. This would also make it easier to override and register new relation types (Many to many?) in the future.
I've started work on refactoring some of bbr to use Rollup + Babel with a more modular design. Overall this should help everyone out to make it more extensible and easier to maintain in the long run. All work will be done on the
next
branch, if you are submitting a pull request make sure to branch offnext
until the release is completed.prepublish
npm script task to run rollupRelation
Relation
fromHasOne
andHasMany
(create lookup store for relation types)HasOne
HasMany
Collection
Model
Store
Semaphore
Relation
to use base objectStore
to use base objectv0.10.0
does to ease transitionSince This library is so tightly coupled in places there will be more extensive refactoring required (for example, the base
Relation
'class' is dependent onHasOne
andHasMany
while bothHasOne
andHasMany
extend and depend onRelation
).Due to the nature of this large of a refactor I'm unsure how collaboration will work out with PRs and merge conflicts. It will take extra coordination.