Skip to content

Commit

Permalink
updated build, fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm committed Jun 30, 2016
1 parent c6947c8 commit 0a2d265
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 69 deletions.
12 changes: 6 additions & 6 deletions packages/inferno/dist/inferno-create-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@

function extend(base, props, all) {
for (var key in props) {
if (all === true || props[key] != null) {
if (all === true || !isNullOrUndefined(props[key])) {
base[key] = props[key];
}
}
Expand All @@ -357,7 +357,7 @@
}

function createClass(obj) {
function cl(props) {
function Cl(props) {
extend(this, obj);
Component.call(this, props);
bindAll(this);
Expand All @@ -367,10 +367,10 @@
}

F.prototype = Component.prototype;
cl.prototype = new F();
cl.prototype.constructor = cl;
cl.displayName = obj.displayName || 'Component';
return cl;
Cl.prototype = new F();
Cl.prototype.constructor = Cl;
Cl.displayName = obj.displayName || 'Component';
return Cl;
}

return createClass;
Expand Down
2 changes: 1 addition & 1 deletion packages/inferno/dist/inferno-create-class.min.js

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

106 changes: 53 additions & 53 deletions packages/inferno/dist/inferno-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -2080,73 +2080,73 @@
} else {
if (domNode.nodeType !== 1 || tag !== domNode.tagName.toLowerCase()) {
// remake node
debugger;
// debugger;
} else {
node.dom = domNode;
var hooks = node.hooks;

if (bp.hasHooks === true || !isNullOrUndefined(hooks)) {
handleAttachedHooks(hooks, lifecycle, domNode);
}
var children = node.children;
node.dom = domNode;
var hooks = node.hooks;

if (!isNullOrUndefined(children)) {
if (isStringOrNumber(children)) {
if (domNode.textContent !== children) {
domNode.textContent = children;
}
} else {
var childNodes = getChildNodesWithoutComments(domNode);
if (bp.hasHooks === true || !isNullOrUndefined(hooks)) {
handleAttachedHooks(hooks, lifecycle, domNode);
}
var children = node.children;

if (isArray(children)) {
node.domChildren = childNodes;
if (childNodes.length === children.length) {
for (var i = 0; i < children.length; i++) {
hydrateChild(children[i], childNodes[i], childNodes, domNode, lifecycle, context, instance);
}
} else {
// recreate children?
debugger;
if (!isNullOrUndefined(children)) {
if (isStringOrNumber(children)) {
if (domNode.textContent !== children) {
domNode.textContent = children;
}
} else {
if (childNodes.length === 1) {
hydrateChild(children, childNodes[0], childNodes, domNode, lifecycle, context, instance);
var childNodes = getChildNodesWithoutComments(domNode);

if (isArray(children)) {
node.domChildren = childNodes;
if (childNodes.length === children.length) {
for (var i = 0; i < children.length; i++) {
hydrateChild(children[i], childNodes[i], childNodes, domNode, lifecycle, context, instance);
}
} else {
// recreate children?
// debugger;
}
} else {
// recreate child
debugger;
}
if (childNodes.length === 1) {
hydrateChild(children, childNodes[0], childNodes, domNode, lifecycle, context, instance);
} else {
// recreate child
// debugger;
}
}
}
}
}
var className = node.className;
var style = node.style;
var className = node.className;
var style = node.style;

if (!isNullOrUndefined(className)) {
domNode.className = className;
}
if (!isNullOrUndefined(style)) {
patchStyle(null, style, domNode);
}
if (bp && bp.hasAttrs === true) {
mountBlueprintAttrs(node, bp, domNode, instance);
} else {
var attrs = node.attrs;
if (!isNullOrUndefined(className)) {
domNode.className = className;
}
if (!isNullOrUndefined(style)) {
patchStyle(null, style, domNode);
}
if (bp && bp.hasAttrs === true) {
mountBlueprintAttrs(node, bp, domNode, instance);
} else {
var attrs = node.attrs;

if (!isNullOrUndefined(attrs)) {
handleSelects(node);
mountAttributes(node, attrs, Object.keys(attrs), domNode, instance);
if (!isNullOrUndefined(attrs)) {
handleSelects(node);
mountAttributes(node, attrs, Object.keys(attrs), domNode, instance);
}
}
}
if (bp && bp.hasEvents === true) {
mountBlueprintEvents(node, bp, domNode);
} else {
var events = node.events;
if (bp && bp.hasEvents === true) {
mountBlueprintEvents(node, bp, domNode);
} else {
var events = node.events;

if (!isNullOrUndefined(events)) {
mountEvents(events, Object.keys(events), domNode);
if (!isNullOrUndefined(events)) {
mountEvents(events, Object.keys(events), domNode);
}
}
}
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/DOM/hydration.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function hydrateNode(node, domNode, parentDom, lifecycle, context, instance, isR
tag !== domNode.tagName.toLowerCase()
) {
// remake node
debugger;
// debugger;
} else {
node.dom = domNode;
const hooks = node.hooks;
Expand All @@ -127,14 +127,14 @@ function hydrateNode(node, domNode, parentDom, lifecycle, context, instance, isR
}
} else {
// recreate children?
debugger;
// debugger;
}
} else {
if (childNodes.length === 1) {
hydrateChild(children, childNodes[0], childNodes, domNode, lifecycle, context, instance);
} else {
// recreate child
debugger;
// debugger;
}
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/component/createClass.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Component from './es2015';
import { isNullOrUndefined } from '../core/utils';

// don't autobind these methods since they already have guaranteed context.
const AUTOBIND_BLACKLIST = {
Expand All @@ -18,7 +19,7 @@ function F() {}

function extend(base, props, all) {
for (let key in props) {
if (all === true || props[key] != null) {
if (all === true || !isNullOrUndefined(props[key])) {
base[key] = props[key];
}
}
Expand All @@ -35,7 +36,7 @@ function bindAll(ctx) {
}

export default function createClass(obj) {
function cl(props) {
function Cl(props) {
extend(this, obj);
Component.call(this, props);
bindAll(this);
Expand All @@ -45,8 +46,8 @@ export default function createClass(obj) {
}

F.prototype = Component.prototype;
cl.prototype = new F();
cl.prototype.constructor = cl;
cl.displayName = obj.displayName || 'Component';
return cl;
Cl.prototype = new F();
Cl.prototype.constructor = Cl;
Cl.displayName = obj.displayName || 'Component';
return Cl;
}

0 comments on commit 0a2d265

Please sign in to comment.