Skip to content

Commit dae41b1

Browse files
committed
[build] 0.8.0
1 parent 6c1e48a commit dae41b1

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

dist/vuex.js

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vuex v0.7.1
2+
* Vuex v0.8.0
33
* (c) 2016 Evan You
44
* Released under the MIT License.
55
*/
@@ -142,13 +142,31 @@
142142
};
143143

144144
function override (Vue) {
145-
Vue.mixin({ init: init });
145+
var version = Number(Vue.version.split('.')[0]);
146+
147+
if (version >= 2) {
148+
Vue.mixin({
149+
init: vuexInit
150+
});
151+
} else {
152+
(function () {
153+
// override init and inject vuex init procedure
154+
// for 1.x backwards compatibility.
155+
var _init = Vue.prototype._init;
156+
Vue.prototype._init = function () {
157+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
158+
159+
options.init = options.init ? [vuexInit].concat(options.init) : vuexInit;
160+
_init.call(this, options);
161+
};
162+
})();
163+
}
146164

147165
/**
148166
* Vuex init hook, injected into each instances init hooks list.
149167
*/
150168

151-
function init() {
169+
function vuexInit() {
152170
var options = this.$options;
153171
var store = options.store;
154172
var vuex = options.vuex;
@@ -611,14 +629,9 @@
611629
install(window.Vue);
612630
}
613631

614-
function createLogger() {
615-
console.warn('[vuex] Vuex.createLogger has been deprecated.' + 'Use `import createLogger from \'vuex/logger\' instead.');
616-
}
617-
618632
var index = {
619633
Store: Store,
620-
install: install,
621-
createLogger: createLogger
634+
install: install
622635
};
623636

624637
return index;

dist/vuex.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)