Skip to content

Commit

Permalink
change nova-core folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
comus committed Feb 6, 2017
1 parent 2ab3fd3 commit 33b3b5b
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 26 deletions.
4 changes: 0 additions & 4 deletions packages/nova-core/lib/client.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/nova-core/lib/client/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import './auth.js';
import './mongo_redux.js';

export * from '../modules/index.js';
export * from './render_context.js';
2 changes: 1 addition & 1 deletion packages/nova-core/lib/client/render_context.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';

import { createApolloClient, addReducer, addMiddleware, getReducers, getMiddlewares } from '../modules.js';
import { createApolloClient, addReducer, addMiddleware, getReducers, getMiddlewares } from '../modules/index.js';

const loginToken = global.localStorage['Meteor.loginToken'];
const apolloClient = createApolloClient();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,43 @@
// import and re-export
export { Components, registerComponent, replaceComponent, getRawComponent, getComponent, copyHoCs, populateComponentsApp, createCollection, Callbacks, addCallback, removeCallback, runCallbacks, runCallbacksAsync, GraphQLSchema, Routes, addRoute, getRoute, populateRoutesApp, Utils, getSetting, Strings, addStrings, configureStore, getActions, addAction, getReducers, addReducer, getMiddlewares, addMiddleware, Headtags, Fragments, registerFragment, getFragment, getFragmentName, extendFragment, createApolloClient } from 'meteor/nova:lib';

import './callbacks.js';

// import and re-export
export {
// apollo
createApolloClient,
// callbacks
Callbacks, addCallback, removeCallback, runCallbacks, runCallbacksAsync,
// components
Components, registerComponent, replaceComponent, getRawComponent, getComponent, copyHoCs, populateComponentsApp,
// collections
createCollection,
// fragments
Fragments, registerFragment, getFragment, getFragmentName, extendFragment,
// graphql
GraphQLSchema,
// headtags
Headtags,
// redux
getActions, addAction, getReducers, addReducer, getMiddlewares, addMiddleware,
// routes
Routes, addRoute, getRoute, populateRoutesApp,
// settings
getSetting,
// strings
Strings, addStrings,
// utils
Utils,
// store (for server only)
configureStore,
// mutations (for server only)
newMutation, editMutation, removeMutation,
} from 'meteor/nova:lib';

export { default as App } from "./components/App.jsx";
export { default as Icon } from "./components/Icon.jsx";
export { default as Loading } from "./components/Loading.jsx";
export { default as ShowIf } from "./components/ShowIf.jsx";
export { default as ModalTrigger } from './components/ModalTrigger.jsx';

export { default as withMessages } from "./containers/withMessages.js";
export { default as withList } from './containers/withList.js';
export { default as withDocument } from './containers/withDocument.js';
Expand Down
8 changes: 0 additions & 8 deletions packages/nova-core/lib/server.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/nova-core/lib/server/apollo_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { _ } from 'meteor/underscore';

import Users from 'meteor/nova:users';

import { GraphQLSchema } from '../modules.js';
import { GraphQLSchema } from '../modules/index.js';

const generateTypeDefs = () => [`
Expand Down
7 changes: 7 additions & 0 deletions packages/nova-core/lib/server/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import './oauth.js';
import './start.js';
import './apollo_server.js';
import './meteor_subscribe.js'

export * from '../modules/index.js';
export * from './render_context.js';
2 changes: 1 addition & 1 deletion packages/nova-core/lib/server/render_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { WebApp } from 'meteor/webapp';
import { DDP } from 'meteor/ddp';
import { Accounts } from 'meteor/accounts-base';

import { createApolloClient, getReducers, getMiddlewares, configureStore } from '../modules.js';
import { createApolloClient, getReducers, getMiddlewares, configureStore } from '../modules/index.js';

const Fibers = Npm.require('fibers');

Expand Down
4 changes: 2 additions & 2 deletions packages/nova-core/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Package.onUse(function(api) {
'nova:lib@1.0.0'
]);

api.mainModule("lib/server.js", "server");
api.mainModule("lib/client.js", "client");
api.mainModule('lib/server/main.js', 'server');
api.mainModule('lib/client/main.js', 'client');

});
6 changes: 0 additions & 6 deletions packages/nova-core/scss.json

This file was deleted.

0 comments on commit 33b3b5b

Please sign in to comment.