Skip to content

Commit

Permalink
[build] 2.0.0-alpha.8
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 28, 2016
1 parent eb9eb98 commit a633b3b
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 69 deletions.
23 changes: 16 additions & 7 deletions dist/vue.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ function initLifecycle(vm) {
vm.$refs = {};

vm._watcher = null;
vm._inactive = false;
vm._isMounted = false;
vm._isDestroyed = false;
vm._isBeingDestroyed = false;
Expand Down Expand Up @@ -1681,6 +1682,7 @@ function insert(vnode) {
callHook(vnode.child, 'mounted');
}
if (vnode.data.keepAlive) {
vnode.child._inactive = false;
callHook(vnode.child, 'activated');
}
}
Expand All @@ -1690,6 +1692,7 @@ function destroy(vnode) {
if (!vnode.data.keepAlive) {
vnode.child.$destroy();
} else {
vnode.child._inactive = true;
callHook(vnode.child, 'deactivated');
}
}
Expand Down Expand Up @@ -2800,7 +2803,7 @@ Object.defineProperty(Vue.prototype, '$isServer', {
}
});

Vue.version = '2.0.0-alpha.7';
Vue.version = '2.0.0-alpha.8';

// attributes that should be using props for binding
var mustUseProp = makeMap('value,selected,checked,muted');
Expand Down Expand Up @@ -3023,7 +3026,8 @@ var nodeOps = Object.freeze({
setAttribute: setAttribute
});

var emptyNode = new VNode('', {}, []);
var emptyData = {};
var emptyNode = new VNode('', emptyData, []);
var hooks$1 = ['create', 'update', 'postpatch', 'remove', 'destroy'];

function isUndef(s) {
Expand Down Expand Up @@ -3161,7 +3165,7 @@ function createPatchFunction(backend) {
cbs.destroy[i](vnode);
}
}
if (isDef(i = vnode.child)) {
if (isDef(i = vnode.child) && !data.keepAlive) {
invokeDestroyHook(i._vnode);
}
if (isDef(i = vnode.children)) {
Expand Down Expand Up @@ -3291,13 +3295,18 @@ function createPatchFunction(backend) {
if (oldVnode === vnode) return;
var i = void 0,
hook = void 0;
if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
i(oldVnode, vnode);
var hasData = isDef(i = vnode.data);
if (hasData) {
// ensure the oldVnode also has data during patch
oldVnode.data = oldVnode.data || emptyData;
if (isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
i(oldVnode, vnode);
}
}
var elm = vnode.elm = oldVnode.elm;
var oldCh = oldVnode.children;
var ch = vnode.children;
if (isDef(vnode.data)) {
if (hasData) {
for (i = 0; i < cbs.update.length; ++i) {
cbs.update[i](oldVnode, vnode);
}if (isDef(hook) && isDef(i = hook.update)) i(oldVnode, vnode);
Expand All @@ -3316,7 +3325,7 @@ function createPatchFunction(backend) {
} else if (oldVnode.text !== vnode.text) {
nodeOps.setTextContent(elm, vnode.text);
}
if (isDef(vnode.data)) {
if (hasData) {
for (i = 0; i < cbs.postpatch.length; ++i) {
cbs.postpatch[i](oldVnode, vnode);
}if (isDef(hook) && isDef(i = hook.postpatch)) i(oldVnode, vnode);
Expand Down
25 changes: 17 additions & 8 deletions dist/vue.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.0.0-alpha.7
* Vue.js v2.0.0-alpha.8
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -1414,6 +1414,7 @@
vm.$refs = {};

vm._watcher = null;
vm._inactive = false;
vm._isMounted = false;
vm._isDestroyed = false;
vm._isBeingDestroyed = false;
Expand Down Expand Up @@ -1688,6 +1689,7 @@
callHook(vnode.child, 'mounted');
}
if (vnode.data.keepAlive) {
vnode.child._inactive = false;
callHook(vnode.child, 'activated');
}
}
Expand All @@ -1697,6 +1699,7 @@
if (!vnode.data.keepAlive) {
vnode.child.$destroy();
} else {
vnode.child._inactive = true;
callHook(vnode.child, 'deactivated');
}
}
Expand Down Expand Up @@ -2805,7 +2808,7 @@
}
});

Vue.version = '2.0.0-alpha.7';
Vue.version = '2.0.0-alpha.8';

// attributes that should be using props for binding
var mustUseProp = makeMap('value,selected,checked,muted');
Expand Down Expand Up @@ -3028,7 +3031,8 @@ var nodeOps = Object.freeze({
setAttribute: setAttribute
});

var emptyNode = new VNode('', {}, []);
var emptyData = {};
var emptyNode = new VNode('', emptyData, []);
var hooks$1 = ['create', 'update', 'postpatch', 'remove', 'destroy'];

function isUndef(s) {
Expand Down Expand Up @@ -3166,7 +3170,7 @@ var nodeOps = Object.freeze({
cbs.destroy[i](vnode);
}
}
if (isDef(i = vnode.child)) {
if (isDef(i = vnode.child) && !data.keepAlive) {
invokeDestroyHook(i._vnode);
}
if (isDef(i = vnode.children)) {
Expand Down Expand Up @@ -3296,13 +3300,18 @@ var nodeOps = Object.freeze({
if (oldVnode === vnode) return;
var i = void 0,
hook = void 0;
if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
i(oldVnode, vnode);
var hasData = isDef(i = vnode.data);
if (hasData) {
// ensure the oldVnode also has data during patch
oldVnode.data = oldVnode.data || emptyData;
if (isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
i(oldVnode, vnode);
}
}
var elm = vnode.elm = oldVnode.elm;
var oldCh = oldVnode.children;
var ch = vnode.children;
if (isDef(vnode.data)) {
if (hasData) {
for (i = 0; i < cbs.update.length; ++i) {
cbs.update[i](oldVnode, vnode);
}if (isDef(hook) && isDef(i = hook.update)) i(oldVnode, vnode);
Expand All @@ -3321,7 +3330,7 @@ var nodeOps = Object.freeze({
} else if (oldVnode.text !== vnode.text) {
nodeOps.setTextContent(elm, vnode.text);
}
if (isDef(vnode.data)) {
if (hasData) {
for (i = 0; i < cbs.postpatch.length; ++i) {
cbs.postpatch[i](oldVnode, vnode);
}if (isDef(hook) && isDef(i = hook.postpatch)) i(oldVnode, vnode);
Expand Down
6 changes: 3 additions & 3 deletions dist/vue.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/vue-server-renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2224,6 +2224,7 @@ function initLifecycle(vm) {
vm.$refs = {};

vm._watcher = null;
vm._inactive = false;
vm._isMounted = false;
vm._isDestroyed = false;
vm._isBeingDestroyed = false;
Expand Down Expand Up @@ -2576,6 +2577,7 @@ function insert(vnode) {
callHook(vnode.child, 'mounted');
}
if (vnode.data.keepAlive) {
vnode.child._inactive = false;
callHook(vnode.child, 'activated');
}
}
Expand All @@ -2585,6 +2587,7 @@ function destroy(vnode) {
if (!vnode.data.keepAlive) {
vnode.child.$destroy();
} else {
vnode.child._inactive = true;
callHook(vnode.child, 'deactivated');
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-server-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-server-renderer",
"version": "2.0.0-alpha.7",
"version": "2.0.0-alpha.8",
"description": "server renderer for Vue 2.0",
"main": "index.js",
"repository": {
Expand Down
54 changes: 6 additions & 48 deletions packages/vue-template-compiler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

Object.defineProperty(exports, '__esModule', { value: true });

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var entities = require('entities');
var deindent = _interopDefault(require('de-indent'));

/**
* Convert a value to a string that is actually rendered.
Expand Down Expand Up @@ -1415,6 +1418,7 @@ function initLifecycle(vm) {
vm.$refs = {};

vm._watcher = null;
vm._inactive = false;
vm._isMounted = false;
vm._isDestroyed = false;
vm._isBeingDestroyed = false;
Expand Down Expand Up @@ -1689,6 +1693,7 @@ function insert(vnode) {
callHook(vnode.child, 'mounted');
}
if (vnode.data.keepAlive) {
vnode.child._inactive = false;
callHook(vnode.child, 'activated');
}
}
Expand All @@ -1698,6 +1703,7 @@ function destroy(vnode) {
if (!vnode.data.keepAlive) {
vnode.child.$destroy();
} else {
vnode.child._inactive = true;
callHook(vnode.child, 'deactivated');
}
}
Expand Down Expand Up @@ -4185,54 +4191,6 @@ function makeFunction(code) {
}
}

var splitRE$1 = /\r?\n/g;
var emptyRE = /^\s*$/;
var needFixRE = /^(\r?\n)*[\t\s]/;

function deindent(str) {
if (!needFixRE.test(str)) {
return str;
}
var lines = str.split(splitRE$1);
var min = Infinity;
var type = void 0,
cur = void 0,
c = void 0;
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
if (!emptyRE.test(line)) {
if (!type) {
c = line.charAt(0);
if (c === ' ' || c === '\t') {
type = c;
cur = count(line, type);
if (cur < min) {
min = cur;
}
} else {
return str;
}
} else {
cur = count(line, type);
if (cur < min) {
min = cur;
}
}
}
}
return lines.map(function (line) {
return line.slice(min);
}).join('\n');
}

function count(line, type) {
var i = 0;
while (line.charAt(i) === type) {
i++;
}
return i;
}

var splitRE = /\r?\n/g;
var isSpecialTag$1 = makeMap('script,style,template', true);

Expand Down
2 changes: 1 addition & 1 deletion packages/vue-template-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-template-compiler",
"version": "2.0.0-alpha.7",
"version": "2.0.0-alpha.8",
"description": "template compiler for Vue 2.0",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Object.defineProperty(Vue.prototype, '$isServer', {
get: () => config._isServer
})

Vue.version = '2.0.0-alpha.7'
Vue.version = '2.0.0-alpha.8'

export default Vue

0 comments on commit a633b3b

Please sign in to comment.