Skip to content

Commit

Permalink
[build] 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 23, 2016
1 parent 6c1e48a commit dae41b1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
31 changes: 22 additions & 9 deletions dist/vuex.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vuex v0.7.1
* Vuex v0.8.0
* (c) 2016 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -142,13 +142,31 @@
};

function override (Vue) {
Vue.mixin({ init: init });
var version = Number(Vue.version.split('.')[0]);

if (version >= 2) {
Vue.mixin({
init: vuexInit
});
} else {
(function () {
// override init and inject vuex init procedure
// for 1.x backwards compatibility.
var _init = Vue.prototype._init;
Vue.prototype._init = function () {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];

options.init = options.init ? [vuexInit].concat(options.init) : vuexInit;
_init.call(this, options);
};
})();
}

/**
* Vuex init hook, injected into each instances init hooks list.
*/

function init() {
function vuexInit() {
var options = this.$options;
var store = options.store;
var vuex = options.vuex;
Expand Down Expand Up @@ -611,14 +629,9 @@
install(window.Vue);
}

function createLogger() {
console.warn('[vuex] Vuex.createLogger has been deprecated.' + 'Use `import createLogger from \'vuex/logger\' instead.');
}

var index = {
Store: Store,
install: install,
createLogger: createLogger
install: install
};

return index;
Expand Down
4 changes: 2 additions & 2 deletions dist/vuex.min.js

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

0 comments on commit dae41b1

Please sign in to comment.