Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// install router state
import './utils/router.state.js';
// app routes
import {Route, DefaultRoute, NotFoundRoute, RedirectRoute} from 'riot-router/lib/router.js';
riot.router.routes([
new Route({path: 'user/:id', tag: 'user'}),
new DefaultRoute({tag: 'users'}),
]);
// Mount all Riot tags.
riot.mount('*');
// Start routing
riot.router.start();
// Exports
window.store = store;
window.riot = riot;
import * as store from './stores';
import riot from 'riot';
// install mixins & tags
import './mixins';
import './tags';
// install router state
import './utils/router.state.js';
// app routes
import {Route, DefaultRoute, NotFoundRoute, RedirectRoute} from 'riot-router/lib/router.js';
riot.router.routes([
new Route({path: 'user/:id', tag: 'user'}),
new DefaultRoute({tag: 'users'}),
]);
// Mount all Riot tags.
riot.mount('*');
// Start routing
riot.router.start();
// Exports
window.store = store;
window.riot = riot;
if (route && route[0])
_route.apply(null, _parser(route));
else
_route = route;
}
riot.route.start = function() {};
riot.route.exec = function(_route) {};
exports.riot = riot;
})(global);
require('../lib/router.js');
module.exports = {
riot: riot,
router: riot.router,
}