Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPal committed Nov 27, 2015
1 parent b83aba6 commit 81c1a8d
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
9 changes: 4 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ var stylish = require('jshint-stylish');
var buffer = require('vinyl-buffer');
var _ = require('lodash');

var browserSync = require('browser-sync');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;

var api = require('./api/api');

gulp.task('clean', function(cb) {
del([
return del([
'app/tmp'
], cb);
});
Expand Down Expand Up @@ -70,7 +70,6 @@ function bundle(cb, watch) {
}

gulp.task('scripts', function(cb) {
process.env.BROWSERIFYSWAP_ENV = 'dist';
bundle(cb, true);
});

Expand Down Expand Up @@ -106,8 +105,8 @@ gulp.task('test', [
'mocha'
]);

gulp.task('watch', ['build'], function(cb) {
browserSync({
gulp.task('watch', ['build'], function() {
browserSync.init({
server: {
baseDir: 'dist',
middleware: function(req, res, next) {
Expand Down
63 changes: 33 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,63 +25,66 @@
},
"homepage": "https://github.com/thejameskyle/marionette-wires",
"devDependencies": {
"babel": "^4.6.3",
"babelify": "^5.0.3",
"bluebird": "^2.7.1",
"babel": "^6.1.18",
"babel-polyfill": "^6.2.0",
"babel-preset-es2015": "^6.1.18",
"babelify": "^7.2.0",
"bluebird": "^3.0.5",
"body-parser": "^1.10.1",
"browser-sync": "^1.9.0",
"browserify": "^8.1.1",
"browser-sync": "^2.10.0",
"browserify": "^12.0.1",
"browserify-shim": "^3.8.2",
"chai": "^1.10.0",
"del": "^1.1.1",
"chai": "^3.4.1",
"del": "^2.1.0",
"express": "^4.11.0",
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.1.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-env": "^0.2.0",
"gulp-jshint": "^1.9.0",
"gulp-jshint": "^2.0.0",
"gulp-less": "^3.0.1",
"gulp-load-plugins": "^0.8.0",
"gulp-load-plugins": "^1.1.0",
"gulp-mocha": "^2.0.0",
"gulp-plumber": "^0.6.6",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.0",
"gulp-sourcemaps": "^1.3.0",
"gulp-symlink": "^2.1.0",
"gulp-util": "^3.0.2",
"gulp-watch": "^3.0.0",
"gulp-watch": "^4.3.5",
"hbsfy": "^2.2.1",
"jsdom": "^2.0.0",
"jshint-stylish": "^1.0.0",
"minimatch": "^2.0.1",
"jsdom": "^7.1.0",
"jshint": "^2.8.0",
"jshint-stylish": "^2.1.0",
"minimatch": "^3.0.0",
"mocha": "^2.1.0",
"morgan": "^1.5.1",
"pioneer": "^0.11.0",
"proxyquire": "^1.3.0",
"proxyquire": "^1.7.3",
"request": "^2.51.0",
"selenium-webdriver": "^2.44.0",
"sinon": "^1.12.2",
"sinon-chai": "^2.6.0",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.0.0",
"watchify": "^2.2.1",
"yargs": "^1.3.3"
"watchify": "^3.6.1",
"yargs": "^3.30.0"
},
"dependencies": {
"animate.css": "^3.1.1",
"backbone": "1.1.2",
"backbone": "1.2.3",
"backbone-query-parameters": "jhudson8/backbone-query-parameters",
"backbone-routing": "^0.1.0",
"backbone-service-modals": "^0.1.0",
"backbone.marionette": "^2.3.1",
"backbone.radio": "^0.6.0",
"backbone.service": "^0.4.1",
"backbone-routing": "^0.2.0",
"backbone-service-modals": "^0.2.0",
"backbone.marionette": "^2.4.4",
"backbone.radio": "^1.0.2",
"backbone.service": "^0.5.0",
"backbone.storage": "^0.1.0",
"backbone.syphon": "^0.5.0",
"bootstrap": "^3.3.1",
"backbone.syphon": "^0.6.3",
"bootstrap": "^3.3.6",
"browserify-swap": "^0.2.1",
"handlebars": "^1.3.0",
"jquery": "^2.1.3",
"lodash": "^2.4.1",
"nprogress": "^0.1.6"
"handlebars": "^4.0.5",
"jquery": "^2.1.4",
"lodash": "^3.10.1",
"nprogress": "^0.2.0"
},
"browser": {
"bootstrap": "./node_modules/bootstrap/dist/js/bootstrap.js"
Expand Down
6 changes: 5 additions & 1 deletion src/books/index/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ import {history} from 'backbone';
import storage from '../storage';

export default Route.extend({
initialize() {
this.listenTo(this, 'enter', this.onEnter);
},

fetch() {
return storage.findAll().then(collection => {
this.collection = collection;
});
},

onEnter() {
var id = this.collection.first().get('id');
let id = this.collection.first().get('id');
history.navigate(`books/${id}`, {
trigger: true,
replace: true
Expand Down
1 change: 1 addition & 0 deletions src/books/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ShowRoute from './show/route';
export default Router.extend({
initialize(options = {}) {
this.container = options.container;
this.listenTo(this, 'before:enter', this.onBeforeEnter);

HeaderService.request('add', {
name: 'Books',
Expand Down
10 changes: 4 additions & 6 deletions src/books/show/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ import storage from '../storage';
export default Route.extend({
initialize(options = {}) {
this.layout = options.layout;
this.listenTo(this, 'fetch', this.onFetch);
},

fetch() {
fetch(id) {
return storage.findAll().then(collection => {
this.collection = collection;
this.model = this.collection.get(id);
this.collection.active = this.model;
});
},

onFetch(id) {
this.model = this.collection.get(id);
this.collection.active = this.model;
},

render() {
this.library = new LibraryView({
collection: this.collection
Expand Down
1 change: 1 addition & 0 deletions src/colors/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import EditRoute from './edit/route';
export default Router.extend({
initialize(options = {}) {
this.container = options.container;
this.listenTo(this, 'before:enter', this.onBeforeEnter);

HeaderService.request('add', {
name: 'Colors',
Expand Down
2 changes: 1 addition & 1 deletion src/modal/layout-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default LayoutView.extend({
'hidden.bs.modal' : 'modal:hide',
},

initialize() {
onShow() {
this.$el.modal({
show: false,
backdrop: 'static'
Expand Down
2 changes: 1 addition & 1 deletion src/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Marionette from 'backbone.marionette';
import 'bootstrap';
import 'backbone.syphon';
import 'backbone-query-parameters';
import 'babel/polyfill';
import 'babel-polyfill';

// start the marionette inspector
if (window.__agent) {
Expand Down
1 change: 0 additions & 1 deletion test/setup/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var _ = require('lodash');
var Backbone = require('backbone');
var $ = require('jquery');
Backbone.$ = $;
var Marionette = require('backbone.marionette');

Expand Down
9 changes: 4 additions & 5 deletions test/setup/node.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
// First run
if (!global.document || !global.window) {
require('babel/register');
require('babel-register');

var jsdom = require('jsdom').jsdom;

global.document = jsdom('<html><head><script></script></head><body></body></html>', null, {
global.document = jsdom('<html><head><script></script></head><body></body></html>', {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script'],
MutationEvents : '2.0',
QuerySelector : false
});

global.window = document.parentWindow;
global.window = document.defaultView;
global.navigator = global.window.navigator;
global.location = global.window.location;
}

global.$ = global.jQuery = require('jquery');
global.$ = global.jQuery = require('jquery/dist/jquery')(global.window);

var proxyquire = require('proxyquire').noCallThru();
var sinon = require('sinon');
Expand Down
5 changes: 3 additions & 2 deletions test/unit/application/controller.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ describe('application/application', function() {

this.Controller = proxyquire('../../src/application/application.js', {
'./layout-view': this.LayoutView,
});
'jquery': global.$
}).default;

this.module = new this.Controller();
});
Expand All @@ -17,7 +18,7 @@ describe('application/application', function() {

it('should create a layout', function() {
expect(this.LayoutView).to.have.been.calledWithNew;
expect(this.module).to.have.property('layout', this.layout);
expect(this.module).to.have.property('layout');
});
});
});
2 changes: 1 addition & 1 deletion test/unit/colors/model.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('colors/model', function() {
beforeEach(function() {
this.Model = proxyquire('../../src/colors/model.js', {});
this.Model = proxyquire('../../src/colors/model.js', {}).default;
this.model = new this.Model();
});

Expand Down
2 changes: 1 addition & 1 deletion test/unit/colors/show/view.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('colors/show/view', function() {

this.View = proxyquire('../../src/colors/show/view.js', {
'./template.hbs' : this.template
});
}).default;

this.itemView = new this.View({ model: this.model });
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/flashes/item-view.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ describe('flashes/item-view', function() {
this.model = { get: stub(), destroy: stub() };
this.ItemView = proxyquire('../../src/flashes/item-view.js', {
'./item-template.hbs' : stub(),
});
}).default;

this.itemView = new this.ItemView({ model: this.model });
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/flashes/model.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('flashes/model', function() {
beforeEach(function() {
this.Model = proxyquire('../../src/flashes/model.js', {});
this.Model = proxyquire('../../src/flashes/model.js', {}).default;
this.model = new this.Model();
});

Expand Down
2 changes: 1 addition & 1 deletion test/unit/flashes/service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('flashes/service', function() {
this.service = proxyquire('../../src/flashes/service.js', {
'./collection' : this.Collection,
'./collection-view' : this.CollectionView
});
}).default;

this.service.setup({
container: this.container
Expand Down
2 changes: 1 addition & 1 deletion test/unit/header/service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('header/service', function() {
this.service = proxyquire('../../src/header/service.js', {
'./view' : this.View,
'backbone': { Collection: this.Collection }
});
}).default;

this.service.setup({
container: this.container
Expand Down

0 comments on commit 81c1a8d

Please sign in to comment.