rename Thing to Base

pull/1359/head
Rich Harris 8 years ago
parent 45b43e4828
commit 080cbd0052

@ -406,7 +406,7 @@ export default function dom(
// super gross hack to ensure Component isn't declared before its superclass
usedHelpers.delete('Component');
usedHelpers.add('Thing').add('Component');
usedHelpers.add('Base').add('Component');
usedHelpers.forEach(key => {
const str = shared[key];
@ -449,6 +449,7 @@ export default function dom(
inlineHelpers += `var ${generator.alias('transitionManager')} = window.${global} || (window.${global} = ${code});\n\n`;
} else {
const alias = generator.alias(expression.id.name);
if (alias !== expression.id.name)
code.overwrite(expression.id.start, expression.id.end, alias);

@ -10,8 +10,7 @@ export function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
export class Thing {
export class Base {
constructor() {
this._handlers = blankObject();
}
@ -52,7 +51,7 @@ export class Thing {
}
}
export class Component extends Thing {
export class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -1,11 +1,11 @@
import {
Thing,
Base,
assign,
blankObject,
_differsImmutable
} from './shared.js';
class Store extends Thing {
class Store extends Base {
constructor(state, options) {
super();

@ -21,8 +21,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -63,7 +62,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -29,8 +29,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -71,7 +70,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -21,8 +21,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -63,7 +62,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -39,8 +39,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -81,7 +80,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -29,8 +29,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -71,7 +70,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -29,8 +29,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -71,7 +70,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -29,8 +29,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -71,7 +70,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -41,8 +41,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -83,7 +82,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -21,8 +21,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -63,7 +62,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -21,8 +21,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -63,7 +62,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,8 +25,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -67,7 +66,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -33,8 +33,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -75,7 +74,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -27,8 +27,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -69,7 +68,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -37,8 +37,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -79,7 +78,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -23,8 +23,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -65,7 +64,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -29,8 +29,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -71,7 +70,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -9,8 +9,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -51,7 +50,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -33,8 +33,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -75,7 +74,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -29,8 +29,7 @@ function blankObject() {
return Object.create(null);
}
// TODO need to think of a suitable name for this
class Thing {
class Base {
constructor() {
this._handlers = blankObject();
}
@ -71,7 +70,7 @@ class Thing {
}
}
class Component extends Thing {
class Component extends Base {
constructor(options) {
super();
this._bind = options._bind;

@ -25,7 +25,7 @@ function getName(filename) {
return base[0].toUpperCase() + base.slice(1);
}
describe("runtime", () => {
describe.only("runtime", () => {
before(() => {
svelte = loadSvelte(false);
svelte$ = loadSvelte(true);

@ -1,3 +1,4 @@
export default {
solo: true,
html: '<p data-value="10px"></p>'
};

Loading…
Cancel
Save