Skip to content
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

Closed
wants to merge 4 commits into from
Closed

component(1) support #421

wants to merge 4 commits into from

Conversation

nl0
Copy link

@nl0 nl0 commented Nov 21, 2013

Hi there!
Thanks for your work on this great project.
To help it get even better I've implemented component(1) support.

@@ -14,7 +14,7 @@
* CommonJS shim
**/
var _, Backbone, exports;
if ( typeof window === 'undefined' ) {
if ( typeof require === 'function' ) {
Copy link
Collaborator

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

See also #220 and #215

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

Copy link
Author

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.

nl0 added 3 commits November 25, 2013 19:13
* 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
  ...
@brianjmiller
Copy link

Some of these changes are likely superseded by #215 assuming it is merged. Might make sense to pull the component.json out into a separate commit/PR.

@brianjmiller
Copy link

Uh, already merged.

@PaulUithol
Copy link
Owner

Shouldn't this be bower.json nowadays?

@PaulUithol
Copy link
Owner

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."

@PaulUithol PaulUithol mentioned this pull request Mar 25, 2014
@brianjmiller
Copy link

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.

@azhang
Copy link

azhang commented May 1, 2014

+1

@bpatram
Copy link
Collaborator

bpatram commented Mar 28, 2016

Seeing as Component JS is no longer active I am closing this PR

@bpatram bpatram closed this Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants