Closed ocombe closed 10 years ago
Do you think that we should encourage people to use $famous('famous/transitions/Easing') instead of $famous['famous/transitions/Easing'] ? This way we could relay the call to window.famous without the need to keep a map of the properties ?
We could keep the current syntax for now but deprecate it.
I think that's a great idea. In general, that function call instead of direct object reference would give us more flexibility down the road, too.
I'm merging this for now, though: super excited to have the RequireJS dependency gone. Awesome work on this.
Soon, we can 1. Encourage that function syntax with $famous instead of object lookups, and 2. Remove the direct code.famous dependency from bower.json once Famo.us exposes the global object build in their "famous" bower repo.
I'll add the function call monday. We can keep both implementations for a time and deprecate the old one. Le 6 août 2014 19:40, "Zack Brown" notifications@github.com a écrit :
I think that's a great idea. In general, that function call instead of direct object reference would give us more flexibility down the road, too.
I'm merging this for now, though: super excited to have the RequireJS dependency gone. Awesome work on this.
Soon, we can 1. Encourage that function syntax with $famous instead of object lookups, and 2. Remove the direct code.famous dependency from bower.json once Famo.us exposes the global object build in their "famous" bower repo.
— Reply to this email directly or view it on GitHub https://github.com/Famous/famous-angular/pull/157#issuecomment-51369632.
Howdy fellas! What's the status on this?
It's merged into master! (very excited about this one.) Should be cutting 0.3.0 soon, maybe gonna squeeze another couple of features in there first [but you're welcome to work off of master in the meantime]
Both of these commits are in master https://github.com/Famous/famous-angular/commit/12668f2a287439397f2a33907bdfb835a32ed2df and https://github.com/Famous/famous-angular/commit/c9d318f27bb5d5f0ecdadf0029955976b5d8eff0 so I'm not sure why Github doesn't show this as merged. I'll go ahead and close it out.
Absolutely fantastic! Thanks!
I'm using the window.famous object from their global build as you suggested. If you want to distribute your own version of the famous lib, I've managed to generate my own version using browserify-ftw and browserify, but it seems to be a little less clean (they probably use custom parameters).
For the moment I've kept the same function calls by registering the famous lib in the same
_modules
hash that we were using for requirejs. The difference with the global famous object is that we use slashes instead of dots.For example
$famous["famous/utilities/Utility"]
is the equivalent ofwindow.famous.famous.utilities.Utility
.