refactor: byebye mixins package
This commit is contained in:
parent
7fc3935f05
commit
b86bd93db1
|
@ -1,5 +1,4 @@
|
||||||
import {compose, TickingPromise} from '@avocado/core';
|
import {compose, EventEmitter, TickingPromise} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {Traversal} from './traversal';
|
import {Traversal} from './traversal';
|
||||||
import {Traversals} from './traversals';
|
import {Traversals} from './traversals';
|
||||||
|
|
|
@ -67,3 +67,6 @@ export class TickingPromise extends Promise {
|
||||||
this.ticker = null;
|
this.ticker = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export {EventEmitterMixin as EventEmitter} from './event-emitter';
|
||||||
|
export {PropertyMixin as Property} from './property';
|
||||||
|
|
|
@ -2,8 +2,7 @@ import * as I from 'immutable';
|
||||||
import D from 'debug';
|
import D from 'debug';
|
||||||
import without from 'lodash.without';
|
import without from 'lodash.without';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
import {Resource} from '@avocado/resource';
|
import {Resource} from '@avocado/resource';
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
import mapValues from 'lodash.mapvalues';
|
import mapValues from 'lodash.mapvalues';
|
||||||
|
|
||||||
import {arrayUnique, compose} from '@avocado/core';
|
import {arrayUnique, compose, EventEmitter} from '@avocado/core';
|
||||||
import {QuadTree, Rectangle, Vector} from '@avocado/math';
|
import {QuadTree, Rectangle, Vector} from '@avocado/math';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
import {Entity} from '../index';
|
import {Entity} from '../index';
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Vector} from '@avocado/math';
|
import {Vector} from '@avocado/math';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
import {Resource} from '@avocado/resource';
|
import {Resource} from '@avocado/resource';
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {compose, TickingPromise} from '@avocado/core';
|
import {compose, TickingPromise} from '@avocado/core';
|
||||||
import {TransitionResult} from '@avocado/mixins';
|
import {TransitionResult} from '@avocado/timing';
|
||||||
|
|
||||||
import {StateProperty, Trait} from '../trait';
|
import {StateProperty, Trait} from '../trait';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {Vector} from '@avocado/math';
|
import {Vector} from '@avocado/math';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {Trait} from '../trait';
|
import {Trait} from '../trait';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
Property('red'),
|
Property('red'),
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Vector} from '@avocado/math';
|
import {Vector} from '@avocado/math';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {Container} from './container';
|
import {Container} from './container';
|
||||||
import {Renderer} from './renderer';
|
import {Renderer} from './renderer';
|
||||||
|
|
|
@ -2,8 +2,7 @@ const PIXI = 'undefined' !== typeof window ? require('pixi.js') : undefined;
|
||||||
|
|
||||||
import * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {hasGraphics} from '../has-graphics';
|
import {hasGraphics} from '../has-graphics';
|
||||||
import {Image} from '../image';
|
import {Image} from '../image';
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Trait} from '@avocado/entity';
|
import {Trait} from '@avocado/entity';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
import {Ticker} from '@avocado/timing';
|
import {Ticker} from '@avocado/timing';
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
)
|
);
|
||||||
|
|
||||||
export class Emitter extends decorate(Trait) {
|
export class Emitter extends decorate(Trait) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Trait} from '@avocado/entity';
|
import {Trait} from '@avocado/entity';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
Property('stage', {
|
Property('stage', {
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {StateProperty, Trait} from '@avocado/entity';
|
import {StateProperty, Trait} from '@avocado/entity';
|
||||||
import {Rectangle, Vector} from '@avocado/math';
|
import {Rectangle, Vector} from '@avocado/math';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {Container} from '../container';
|
import {Container} from '../container';
|
||||||
import {hasGraphics} from '../has-graphics';
|
import {hasGraphics} from '../has-graphics';
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Mixin, Property} from '@avocado/mixins'
|
|
||||||
|
|
||||||
import * as Vector from './index'
|
import * as Vector from './index'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
export {EventEmitterMixin as EventEmitter} from './event-emitter';
|
|
||||||
export {LfoMixin as Lfo} from './lfo';
|
|
||||||
export {PropertyMixin as Property} from './property';
|
|
||||||
export {TransitionMixin as Transition, TransitionResult} from './transition';
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@avocado/mixins",
|
|
||||||
"version": "1.0.2",
|
|
||||||
"main": "index.js",
|
|
||||||
"author": "cha0s",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@avocado/core": "1.x"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +1,7 @@
|
||||||
import D from 'debug';
|
import D from 'debug';
|
||||||
import io from 'socket.io-client';
|
import io from 'socket.io-client';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {allPackets, idFromPacket} from '../packet';
|
import {allPackets, idFromPacket} from '../packet';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import D from 'debug';
|
import D from 'debug';
|
||||||
import io from 'socket.io-client';
|
import io from 'socket.io-client';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {SocketIoParser, allPackets, idFromPacket} from '../packet';
|
import {SocketIoParser, allPackets, idFromPacket} from '../packet';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {packetFromId} from './registry';
|
import {packetFromId} from './registry';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import SocketIoServer from 'socket.io';
|
import SocketIoServer from 'socket.io';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {SocketIoParser, allPackets, idFromPacket} from '../packet';
|
import {SocketIoParser, allPackets, idFromPacket} from '../packet';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {Shape} from './shape';
|
import {Shape} from './shape';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose, virtualize} from '@avocado/core';
|
import {compose, EventEmitter, virtualize} from '@avocado/core';
|
||||||
import {Rectangle, Vector} from '@avocado/math';
|
import {Rectangle, Vector} from '@avocado/math';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {AbstractBody} from '../abstract/body';
|
import {AbstractBody} from '../abstract/body';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {Vector} from '@avocado/math';
|
import {Vector} from '@avocado/math';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import uuid from 'uuid/v4';
|
import uuid from 'uuid/v4';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
Property('instanceUuid'),
|
Property('instanceUuid'),
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, Property} from '@avocado/core';
|
||||||
import {Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {nextStep} from './next-step';
|
import {nextStep} from './next-step';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {Rectangle, Vector} from '@avocado/math';
|
import {Rectangle, Vector} from '@avocado/math';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
import {Resource} from '@avocado/resource';
|
import {Resource} from '@avocado/resource';
|
||||||
|
|
||||||
import {TimedIndexMixin as TimedIndex} from './timed-index';
|
import {TimedIndexMixin as TimedIndex} from './timed-index';
|
||||||
|
|
|
@ -6,5 +6,7 @@ export {
|
||||||
requestAnimationFrame,
|
requestAnimationFrame,
|
||||||
setAnimation,
|
setAnimation,
|
||||||
} from './animation-frame';
|
} from './animation-frame';
|
||||||
|
export {LfoMixin as Lfo} from './lfo';
|
||||||
export {Ticker} from './ticker';
|
export {Ticker} from './ticker';
|
||||||
export {TimedIndexMixin as TimedIndex} from './timed-index';
|
export {TimedIndexMixin as TimedIndex} from './timed-index';
|
||||||
|
export {TransitionMixin as Transition, TransitionResult} from './transition';
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
|
|
||||||
import {EventEmitterMixin as EventEmitter} from '../event-emitter';
|
|
||||||
import {PropertyMixin as Property} from '../property';
|
|
||||||
import {TransitionMixin as Transition} from '../transition';
|
import {TransitionMixin as Transition} from '../transition';
|
||||||
|
|
||||||
const Modulator = {
|
const Modulator = {
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
import {Ticker} from './ticker';
|
import {Ticker} from './ticker';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
|
|
||||||
import {EventEmitterMixin as EventEmitter} from '../event-emitter';
|
|
||||||
|
|
||||||
import easingFunctions from './easing';
|
import easingFunctions from './easing';
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {Rectangle, Vector} from '@avocado/math';
|
import {Rectangle, Vector} from '@avocado/math';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {Entity, EntityList} from '@avocado/entity';
|
import {Entity, EntityList} from '@avocado/entity';
|
||||||
import {Vector} from '@avocado/math';
|
import {Vector} from '@avocado/math';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
import {ShapeList} from '@avocado/physics';
|
import {ShapeList} from '@avocado/physics';
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {arrayUnique, compose, flatten} from '@avocado/core';
|
import {arrayUnique, compose, EventEmitter, flatten} from '@avocado/core';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
import {Layer} from './layer';
|
import {Layer} from './layer';
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter, Property} from '@avocado/core';
|
||||||
import {Vector} from '@avocado/math';
|
import {Vector} from '@avocado/math';
|
||||||
import {EventEmitter, Property} from '@avocado/mixins';
|
|
||||||
import {RectangleShape} from '@avocado/physics';
|
import {RectangleShape} from '@avocado/physics';
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import * as I from 'immutable';
|
import * as I from 'immutable';
|
||||||
|
|
||||||
import {compose} from '@avocado/core';
|
import {compose, EventEmitter} from '@avocado/core';
|
||||||
import {Rectangle, Vector} from '@avocado/math';
|
import {Rectangle, Vector} from '@avocado/math';
|
||||||
import {EventEmitter} from '@avocado/mixins';
|
|
||||||
import {Synchronized} from '@avocado/state';
|
import {Synchronized} from '@avocado/state';
|
||||||
|
|
||||||
const decorate = compose(
|
const decorate = compose(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user