Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import IntlStore from './stores/IntlStore';
import AttachSubdeckModalStore from './stores/AttachSubdeckModalStore';
import ServiceErrorStore from './stores/ServiceErrorStore';
import PermissionsStore from './stores/PermissionsStore';
import ContentLikeStore from './stores/ContentLikeStore';
import DeckFamilyStore from './stores/DeckFamilyStore';
import MediaStore from './stores/MediaStore';
import UserReviewStore from './stores/UserReviewStore';
import EditRightsStore from './stores/EditRightsStore';
import DeckCollectionStore from './stores/DeckCollectionStore';
import SSOStore from './stores/SSOStore';
import UserRecommendationsStore from './stores/UserRecommendationsStore';
import LoginModalStore from './stores/LoginModalStore';
// create new fluxible instance & register all stores
const app = new Fluxible({
component: Application,
stores: [
RouteStore,
ApplicationStore,
DeckPageStore,
ContentStore,
ContributorsStore,
DeckViewStore,
DeckEditStore,
SlideViewStore,
SlideEditStore,
DataSourceStore,
TagsStore,
ActivityFeedStore,
DeckTreeStore,
TranslationStore,
'use strict';
import Fluxible from 'fluxible';
import Application from './components/Application';
import RouteStore from './stores/RouteStore';
import fetchrPlugin from 'fluxible-plugin-fetchr';
import ApplicationStore from './stores/ApplicationStore';
import UserStore from './stores/UserStore';
import ProjectsStore from './stores/ProjectsStore';
import PostsStore from './stores/PostsStore';
// create new fluxible instance
let app = new Fluxible({
component: Application,
stores: [
ApplicationStore,
UserStore,
ProjectsStore,
RouteStore,
PostsStore
]
});
app.plug(fetchrPlugin({
xhrPath: '/api',
xhrTimeout: 15000
}));
export default app;
let app, context;
// global uncaught exception handler
window.onerror = (message, file, line, col, error) => {
dialog.showErrorBox('Unknown Error', `Unknown Error: ${message}`);
};
// verify web target
if (!(document && ('body' in document))) {
dialog.showErrorBox('Document Error', 'No document body found');
}
tapEventInject(); // @TODO remove when >= React 1.0
// init GUI flux/ible app
app = new Fluxible({
component: MainComponent,
stores: [
CreateModelStore, FileDetailsStore, FileStore, MetricDataStore,
MetricStore, ModelDataStore, ModelStore
]
});
// Plug batchedUpdatePlugin
app.plug(batchedUpdatePlugin);
// Plug HTMStudio plugin giving access to HTMStudio clients
app.plug(HTMStudioPlugin);
// add context to app
context = app.createContext({
configClient: config,
import Fluxible from "fluxible";
import fetchrPlugin from "fluxible-plugin-fetchr";
import { RouteStore } from "fluxible-router";
import routes from "./routes";
import Root from "./containers/Root";
import FeaturedStore from "./stores/FeaturedStore";
import HtmlHeadStore from "./stores/HtmlHeadStore";
import IntlStore from "./stores/IntlStore";
import PhotoStore from "./stores/PhotoStore";
// Create the fluxible app using Root as root component
const app = new Fluxible({ component: Root });
// Make fetchr services respond to /api endpoint
app.plug(fetchrPlugin({ xhrPath: "/api" }));
// Register a fluxible RouteStore
const AppRouteStore = RouteStore.withStaticRoutes(routes);
app.registerStore(AppRouteStore);
// Register app-specific stores
app.registerStore(FeaturedStore);
app.registerStore(HtmlHeadStore);
app.registerStore(IntlStore);
app.registerStore(PhotoStore);
export default app;
// Fluxible app instance
import Fluxible from 'fluxible';
module.exports = new Fluxible({
component: require('./views/App.jsx'),
stores: [
require('./stores/RouteStore'),
require('./stores/MetaStore')
]
});
import Fluxible from 'fluxible';
import Application from 'components/Application';
import routes from 'configs/routes';
import ApplicationStore from 'stores/ApplicationStore';
import SurahsStore from 'stores/SurahsStore';
import UserStore from 'stores/UserStore';
import AyahsStore from 'stores/AyahsStore';
import AudioplayerStore from 'stores/AudioplayerStore';
import React from 'react';
// create new fluxible instance
const app = new Fluxible({
component: React.createFactory(Application)
});
// register other stores
app.registerStore(ApplicationStore);
app.registerStore(SurahsStore);
app.registerStore(UserStore);
app.registerStore(AudioplayerStore);
app.registerStore(AyahsStore);
export default app;
* Assemble the Fluxible app.
*/
import debugLib from 'debug';
import FluxibleApp from 'fluxible';
import fetchrPlugin from 'fluxible-plugin-fetchr';
import Application from './components/Application';
import BackgroundStore from './stores/BackgroundStore';
import ContentStore from './stores/ContentStore';
import ContactStore from './stores/ContactStore';
import RouteStore from './stores/RouteStore';
import ModalStore from './stores/ModalStore';
const debug = debugLib('app');
debug('Creating FluxibleApp');
const app = new FluxibleApp({
component: Application
});
debug('Adding Plugins');
app.plug(fetchrPlugin({ xhrPath: '/_api' }));
debug('Registering Stores');
app.registerStore(BackgroundStore);
app.registerStore(ContentStore);
app.registerStore(ContactStore);
app.registerStore(RouteStore);
app.registerStore(ModalStore);
export default app;
import debugLib from 'debug';
import Fluxible from 'fluxible';
import fetchrPlugin from 'fluxible-plugin-fetchr';
import devToolsPlugin from 'fluxible-plugin-devtools';
import queryPlugin from './plugins/queryPlugin';
import routes from './configs/routes';
import Application from './components/Application';
import DocStore from './stores/DocStore';
import SearchStore from './stores/SearchStore';
import { RouteStore } from 'fluxible-router';
const debug = debugLib('app.js');
const MyRouteStore = RouteStore.withStaticRoutes(routes);
const app = new Fluxible({
component: Application,
componentActionHandler: function (context, payload, done) {
if (payload.err) {
if (payload.err.statusCode === 404) {
debug('component 404 error', payload.err);
}
else {
debug('component exception', payload.err);
}
return;
}
done();
}
});
import Fluxible from 'fluxible';
import {PropTypes} from 'react';
import Routes from './components/Routes.jsx';
let assetUrl = require('./libs/assetUrl');
let app = new Fluxible({
component: Routes
});
app.plug(assetUrl);
app.customContexts = {
assetUrl: PropTypes.func.isRequired,
siteUrl: PropTypes.func.isRequired,
};
app.registerStore(require('./stores/ApplicationStore'));
app.registerStore(require('./stores/TwitterStore'));
export default app;