Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.on('complete', function(){
_.assign(Ractive.transitions, transitions);
});
// attach 'route-link' event for handling internal link clicks
require('./plugins/events');
require('./plugins/transitions');
var _ = require('lodash');
var on_client = require('on-client');
var Ractive = require('ractive');
var ObsRouter = require('obs-router');
var Waitr = require('waitr');
var wrap = require('./wrap');
var scrollTo = require('./scrollTo');
var Page = require('./Page');
// back-up & disable transitions
var transitions = {};
_.assign(transitions, Ractive.transitions);
var fake_transition = function(t){t.complete();};
for (var key in Ractive.transitions){
Ractive.transitions[key] = fake_transition;
}
var initialOptions = {
_: _,
on_client: on_client,
data: {
_: _,
on_client: on_client,
'status-code': 200,
title: 'ractive-express app'
},
onroute: function(params, is_init){/*noop*/},
onconfig: function(){
var ractive_transitions_slide = require('ractive-transitions-slide');
var Ractive = require('ractive');
var fs = require('fs');
var path = require('path');
var ri = require('../../../lib');
var documentTemplate = process.browser ? null : fs.readFileSync(path.join(__dirname, 'document.html'), 'utf8');
var bodyTemplate = fs.readFileSync(path.join(__dirname, 'body.html'), 'utf8');
var pages = require('./pages');
var partials = require('./partials');
Ractive.DEBUG = false;
Ractive.transitions.slide = ractive_transitions_slide;
var Site = ri.Site.extend({
debug: 1,
//useDataScript: false,
//baseUrl: '/yay/',
documentTemplate: documentTemplate,
bodyTemplate: bodyTemplate,
pages: pages,
partials: partials,
data: {
loading_opacity: 0
},
onroute: function(route){
var self = this;
self.set('title', route.name + ' / ractive-isomorphic sandbox');
},