Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import anime from 'animejs'
import riot from 'riot'
const riotExtend = riot.util.misc.extend
const slice = [].slice
export const extend = riotExtend
/**
* Animation trigger when a tag gets mounted
* @param { HTMLElement } root - animate tag root node
* @param { Object } opts - animate tag options
*/
export function onMount(root, opts) {
if (!opts.mount) return
anime(extend({}, opts.mount, {
targets: root,
begin() {
root.style.visibility = null
if (opts.mount.begin) opts.mount.begin(...arguments)
}
this.framework = riot;
this.container = container;
let finalReducer = { ...reducer, ...formReducer };
this.reducer = finalReducer;
this.middlewares = middlewares;
this.buildInProps = ['env', 'entry', 'context', 'mode', 'routes'];
this._mode = 'hash';
this._store = configureStore(state, this.reducer, middlewares, this._mode);
this.router(router);
this._context = {
store: this._store,
hub: router.hub,
tags: {}
};
riot.util.tmpl.errorHandler = e => {}
this.emitter = riot.observable({});
container.widgets = this._widgets = {};
}