-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
component(1) support #421
component(1) support #421
Conversation
@@ -14,7 +14,7 @@ | |||
* CommonJS shim | |||
**/ | |||
var _, Backbone, exports; | |||
if ( typeof window === 'undefined' ) { | |||
if ( typeof require === 'function' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm +1 for adding Component support, but I'm not sure that this change is the best/proper way to do AMD/requirejs support
at this point i'd recommend copying Backbone's framework for commonjs/amd/vanilla, since Backbone now supports AMD: https://github.com/jashkenas/backbone/blob/master/backbone.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding AMD/require support wasn't my intent -- it is a bit more involved. I just wanted to fix CommonJS support for the browser and add component.json
to be able to use the package properly in component(1)
environment.
* upstream/master: (35 commits) Upgrade qunit Fix subModels not being populated properly on Underscore 1.6.0, due to `_.each` api change. Fire change events right away if we're not in a nested scenario. Fixes PaulUithol#427 Document `store.unregister` `store.unregister` now also accepts collections or a model type Change `findOrCreate` to pass `parsedAttributes` to `build`, and adjust tests to reflect change. Remove unnecessary locking Update change log Add test for models not being added to store until they get an id Change where we listen to `relational:unregister`. Only add models with an id to the store. Closes PaulUithol#411 Fix a bug in the (crude) performance test Add a small test for `clear` Fix collection return values when setting/removing `[]` and `null`. Ref PaulUithol#419 Clarify the behavior of `findOrCreate` when it just a receives a scalar value. Ref PaulUithol#399 Proper return values on collection methods for Backbone 1.1. Closes PaulUithol#419 Submodels: accommodate multiple 'type' keys for the same submodel. Closes PaulUithol#429 Hmm, fix spaces/tabs mix in the example Update a few version numbers in the docs to 0.8.7 Backbone-relational 0.8.7 ...
Some of these changes are likely superseded by #215 assuming it is merged. Might make sense to pull the |
Uh, already merged. |
Shouldn't this be |
Or is that something different altogether again.. seeing a comment in the docs there: "In versions of Bower before 0.9.0 the package metadata file was called component.json rather than bower.json. This has changed to avoid a name clash with another tool. You can still use component.json for now but it is deprecated and the automatic fallback is likely to be removed in an upcoming release." |
Yes, different tools. Based on the original I understood it to be the component.io version of component.json. Bower compat should come from bower.json. |
+1 |
Seeing as Component JS is no longer active I am closing this PR |
Hi there!
Thanks for your work on this great project.
To help it get even better I've implemented component(1) support.