Skip to content

Commit

Permalink
Update to v4 API
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfalgout committed Jul 23, 2018
1 parent f91aabf commit 7c6957c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"upgradeGuide.md"
],
"dependencies": {
"backbone.marionette": "^3.0.0"
"backbone.marionette": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"github": "https://github.com/marionettejs/marionette.approuter",
"dependencies": {
"backbone.marionette": "^3.0.0"
"backbone.marionette": "^4.0.0, 4.0.0-beta.1"
},
"peerDependencies": {
"backbone": "~1.3.3",
Expand Down
5 changes: 3 additions & 2 deletions src/marionette.approuter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import Backbone from 'backbone';
import _ from 'underscore';
import Marionette from 'backbone.marionette';
import Marionette, { MnObject } from 'backbone.marionette';

// API borrowed from Marionette.Object
const ObjectAPI = [
Expand Down Expand Up @@ -101,8 +101,9 @@ const AppRouter = Backbone.Router.extend({
}
});

_.extend(AppRouter.prototype, _.pick(Marionette.Object.prototype, ObjectAPI));
_.extend(AppRouter.prototype, _.pick(MnObject.prototype, ObjectAPI));

// For Backwards compatibility
Marionette.AppRouter = AppRouter;

export default AppRouter;
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,9 @@ babylon@^6.11.2, babylon@^6.17.2:
version "6.17.4"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a"

backbone.marionette@^3.0.0:
version "3.4.2"
resolved "https://registry.yarnpkg.com/backbone.marionette/-/backbone.marionette-3.4.2.tgz#42b61cd1f760b1148063a0ea6aeb98be5a6252c6"
"backbone.marionette@^4.0.0, 4.0.0-beta.1":
version "4.0.0-beta.1"
resolved "https://registry.yarnpkg.com/backbone.marionette/-/backbone.marionette-4.0.0-beta.1.tgz#793528fc5c60620200e2440e6dcd04ba16c3aab3"
dependencies:
backbone.radio "^2.0.0"

Expand Down

0 comments on commit 7c6957c

Please sign in to comment.