[ALOY-1074] Enable developers to specify Backbone version in config.json
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-10-24T14:53:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.6.0 |
Components | Models, Tooling |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Feon Sua Xin Miao |
Created | 2014-07-07T17:06:58.000+0000 |
Updated | 2018-01-04T23:29:45.000+0000 |
Description
Enable developers to choose whether to use Backbone 0.9x or 1.x. The default should be 1.x. Support for the older version would be to provide backward compatibility for existing projects that depend on 0.9x behaviors or functionality.Comments
- Feon Sua Xin Miao 2014-09-15
PR : https://github.com/appcelerator/alloy/pull/561
Function test:
1. Create an app, specify backbone version in config.json,
"backbone": "0.9.2"
2. Compile the app, i.e. android and in project dir type:
The correct backbone version should be shown.head Resources/android/alloy/backbone.js
3. Existing sample apps under// Backbone.js 0.9.2
test/apps/models/*
should run without error. 4.test/apps/models/bindings_listview
should run without error on backbone v1.1.2 5. Fortest/models/todo
to run properly on backbone 1.1.2, uncomment the code in model JS that override collection's fetch method Note: default backbone version is 0.9.2 - Tim Poulsen 2014-09-15 Using backbone 1.1.2, the models/todo app does not work properly. I cannot add a new to do task, marking an item as completed throws an "undefined is not and object (evaluating todo.set)" error.
- Tim Poulsen 2014-09-23
PR merged.
For QE test:
1. Run any of the test/apps/models/* test apps. All should run without error
2. Run the models/binding_listview app and then enter the
head
command described in Feon's comment above; it should show backbone version 0.9.2. 3. Edit test/apps/models/binding_listview/config.json to add a new key:"backbone": "1.1.2"
. Edit test/apps/models/binding_listview/models/info.js and uncomment the block as described in the comments in that file. Build and run the app and it should run properly without errors. 4. Run thehead
command again to confirm that the app was built using backbone 1.1.2. - Tim Poulsen 2014-10-23 Reopen to backport to 1_6_X branch
- Feon Sua Xin Miao 2014-10-24 1_6_X: https://github.com/appcelerator/alloy/pull/598
- Tim Poulsen 2014-10-24 Works! PR merged.
- Eric Wieber 2015-03-25
Verified fixed using:
Titanium SDK 4.0.0.v20150323131014
Studio 4.0.0.201503231407
Appc NPM: 0.3.34
Appc CLI 0.2.187
Alloy 1.6.0-alpha
You can correctly set the backbone version in
config.js
. However, 1.X is not the default.