Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
build 2.0.0-pre.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ahumphreys87 committed Apr 6, 2016
1 parent b1ce6a4 commit 943878a
Show file tree
Hide file tree
Showing 10 changed files with 17,045 additions and 10,311 deletions.
27,278 changes: 17,017 additions & 10,261 deletions dist/orchestra.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/orchestra.js.map

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions dist/orchestra.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/orchestra.min.js.map

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "orchestra",
"description": "Simplify Backbone.Marionette applcations with an opinionated set of dependencies",
"version": "1.5.1",
"version": "2.0.0-pre.1",
"authors": [
"Andrew Humphreys <ahumphreys87@googlemail.com>",
"Joe Fitter <hello@joefitter.com>",
Expand All @@ -19,12 +19,11 @@
},
"main": "lib/index.js",
"dependencies": {
"backbone": "1.2.3",
"backbone": "^1.3.3",
"backbone-routing": "^0.2.0",
"backbone-validation": "^0.11.5",
"backbone.cocktail": "0.5.10",
"backbone.marionette": "^2.4.2",
"backbone.radio": "^1.0.0",
"backbone.marionette": "3.0.0-pre.3",
"backbone.service": "^0.5.2",
"backbone.stickit": "^0.9.0",
"backbone.storage": "0.2.1",
Expand All @@ -35,7 +34,7 @@
"i18next": "2.3.5",
"i18next-sprintf-postprocessor": "0.0.6",
"jquery": "2.1.1",
"lodash": "^3.10.1",
"lodash": "^4.0.0",
"moment": "^2.8.3",
"numeral": "^1.5.3"
},
Expand Down
8 changes: 1 addition & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ if (window.__agent) {

handlebarsHelpers();

var func = Backbone.Marionette.Module.create;

Backbone.Marionette.Module.create = function(app, moduleNames, moduleDefinition) {
moduleDefinition.namespace = moduleNames;
func.apply(this, arguments);
};

// build orchestra framework
const Orchestra = {};
_.extend(Orchestra, Backbone);
Expand Down Expand Up @@ -66,6 +59,7 @@ _.extend(Orchestra, {
this.instances[namespace] = new this.Application({
namespace: namespace
});
console.log(namespace, this.instances);
this.listenTo(this.instances[namespace], 'destroy', () => {
delete this.instances[namespace];
});
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/mixins/touch.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {

var props = _.extend(defaultProps, props);

return Orchestra.ItemView.extend(props);
return Orchestra.View.extend(props);
},

boot: function(view, mixViewProps) {
Expand Down
19 changes: 4 additions & 15 deletions tests/spec/index-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ describe('Orchestra', function() {
});

it('should expose Marionette classes', function() {
expect(this.Orchestra.CompositeView).to.be.a('function');
expect(this.Orchestra.Module).to.be.a('function');
expect(this.Orchestra.View).to.be.a('function');
expect(this.Orchestra.CollectionView).to.be.a('function');
});

it('should expose the TouchView object', function() {
Expand Down Expand Up @@ -92,13 +92,13 @@ describe('Orchestra', function() {

it('should return new \'main\' orchestra instance', function() {
component = this.Orchestra.getInstance('main');
expect(component.namespace).to.eql('main');
expect(component.options.namespace).to.eql('main');
});

it('should store reference for instance in instances object', function() {
this.Orchestra.getInstance('main');
expect(this.Orchestra.instances.main).to.be.an('object');
expect(this.Orchestra.instances.main.namespace).to.eql('main');
expect(this.Orchestra.instances.main.options.namespace).to.eql('main');
});

});
Expand All @@ -116,15 +116,4 @@ describe('Orchestra', function() {
});
});

describe('Module.create()', function() {
before(function() {
this.instance = this.Orchestra.getInstance('main');
});

it('should add namespace to options of the module', function() {
this.Orchestra.Module.create(this.instance, 'custom.module', {});
expect(this.instance.custom.module.options.namespace).to.eql('custom.module');
});
});

});

0 comments on commit 943878a

Please sign in to comment.