Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { createStore, applyMiddleware, compose } from 'redux';
import { createEpicMiddleware } from 'redux-observable';
import { browserHistory } from 'react-router';
import { routerMiddleware } from 'react-router-redux';
import rootReducer from './reducers';
import main from './cycle';
import { createCycleMiddleware } from './createCycleMiddleware';
import {makeHTTPDriver} from '@cycle/http';
const cycleMiddleware = createCycleMiddleware(main, { HTTP: makeHTTPDriver() });
export default function configureStore() {
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
rootReducer,
composeEnhancers(
applyMiddleware(
cycleMiddleware,
routerMiddleware(browserHistory)
)
)
);
return store;
}
import {run} from '@cycle/run';
import {makeDOMDriver} from '@cycle/dom';
import {makeHTTPDriver} from '@cycle/http';
var app = require('./app').default;
const drivers = {
DOM: makeDOMDriver('.app'),
HTTP: makeHTTPDriver()
};
run(app, drivers);
h('li.search-result', [
h('a', {href: result.html_url}, result.name)
])
))
])
);
return {
DOM: vtree$,
HTTP: searchRequest$
};
}
const drivers = {
DOM: makeDOMDriver('.js-container'),
HTTP: makeHTTPDriver()
}
Cycle.run(main, drivers);
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
rootReducer,
composeEnhancers(
applyMiddleware(
cycleMiddleware,
routerMiddleware(browserHistory)
)
)
);
run(main, {
ACTION: makeActionDriver(),
STATE: makeStateDriver(),
Time: timeDriver,
HTTP: makeHTTPDriver(),
})
return store;
}
])
))
])
);
const request$ = xs.merge(searchRequest$, otherRequest$);
return {
DOM: vtree$,
HTTP: request$,
};
}
run(main, {
DOM: makeDOMDriver('#main-container'),
HTTP: makeHTTPDriver(),
Time: timeDriver
});
import {run} from '@cycle/xstream-run';
import {makeDOMDriver} from '@cycle/dom';
import {makeHTTPDriver} from '@cycle/http';
import {createHistory} from 'history';
import {makeRouterDriver} from 'cyclic-router';
import Router from './components/Router/index';
const drivers = {
DOM: makeDOMDriver('#root'),
HTTP: makeHTTPDriver(),
router: makeRouterDriver(createHistory(), {capture: true})
};
run(Router, drivers);
import { makeHTTPDriver } from '@cycle/http'
import { Box } from 'dialogues/box'
function main(sources) {
const box = Box(sources)
return {
DOM: box.DOM,
HTTP: box.HTTP,
}
}
const { sinks, sources } = run(main, {
DOM: makeDOMDriver(`#content`),
HTTP: makeHTTPDriver(),
})
if (module.hot) {
module.hot.accept()
module.hot.dispose(_ => (sinks.dispose(), sources.dispose()))
}
import {makeHistoryDriver} from 'cyclic-history'
import {makeRouterDriver} from 'cyclic-router'
import {createHashHistory} from 'history'
import {makeStateDriver} from './state-driver'
import Main from './app'
require("!style!css!./styles/pure-min.css");
require("!style!css!./styles/layout.css");
require("!style!css!./styles/grids-responsive-min.css");
const sources = {
DOM: makeDOMDriver('#application'),
router: makeRouterDriver(makeHistoryDriver(createHashHistory())),
//state$: makeStateDriver(),
HTTP: makeHTTPDriver(),
};
run(Main,sources);
fill: 'black',
x: 0,
y: 12
}
},
title
)
]
)
)
)
};
}
setup(Component, {
HTTP: makeHTTPDriver()
}, {
DOM: DOMWorkerConnector
}, run);
if(data)
body = getBody(JSON.parse(data));
return body;
});
return {
DOM: vtree$,
HTTP: linesRequest$
};
}
const drivers = {
DOM: makeDOMDriver("body"),
HTTP: makeHTTPDriver()
}
Cycle.run(main, drivers);