mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
more cleaning up and reorganizing packages
This commit is contained in:
parent
6fbfe4399b
commit
fc8837ff51
7 changed files with 86 additions and 56 deletions
|
@ -1,35 +1,36 @@
|
|||
############ Nova Core ############
|
||||
|
||||
nova:core # do not remove!
|
||||
nova:core # core components and wrappers
|
||||
|
||||
############ Nova Base Packages ############
|
||||
|
||||
nova:forms # auto-generated forms
|
||||
nova:apollo # data layer
|
||||
nova:routing # routing and server-side rendering
|
||||
nova:email # email
|
||||
nova:users # user management and permissions
|
||||
|
||||
############ Optional Packages ############
|
||||
|
||||
# nova:events
|
||||
# nova:settings
|
||||
nova:users
|
||||
nova:posts
|
||||
nova:comments
|
||||
nova:newsletter
|
||||
nova:search
|
||||
nova:notifications
|
||||
nova:getting-started
|
||||
nova:categories
|
||||
nova:voting
|
||||
nova:forms
|
||||
nova:embedly
|
||||
nova:api
|
||||
nova:email
|
||||
nova:rss
|
||||
# nova:posts
|
||||
# nova:comments
|
||||
# nova:newsletter
|
||||
# nova:search
|
||||
# nova:notifications
|
||||
# nova:getting-started
|
||||
# nova:categories
|
||||
# nova:voting
|
||||
# nova:embedly
|
||||
# nova:api
|
||||
# nova:rss
|
||||
# nova:subscribe
|
||||
# nova:cloudinary
|
||||
nova:routing
|
||||
|
||||
############ Data Layer Package ##############
|
||||
|
||||
nova:apollo # do not remove!
|
||||
|
||||
############ Customizable Packages ############
|
||||
|
||||
nova:base-components # default ui components
|
||||
# nova:base-components # default ui components
|
||||
nova:base-styles # default styling
|
||||
|
||||
# nova:email-templates # default email templates for notifications
|
||||
|
|
|
@ -32,7 +32,6 @@ ecmascript@0.6.1
|
|||
ecmascript-runtime@0.3.15
|
||||
ejson@1.0.13
|
||||
email@1.1.18
|
||||
fortawesome:fontawesome@4.5.0
|
||||
fourseven:scss@3.10.1
|
||||
geojson-utils@1.0.10
|
||||
hot-code-push@1.0.4
|
||||
|
@ -55,7 +54,6 @@ meteorhacks:inject-data@2.0.1-nova-patch
|
|||
meteorhacks:inject-initial@1.0.4
|
||||
meteorhacks:meteorx@1.4.1
|
||||
meteorhacks:picker@1.0.3
|
||||
meteorhacks:subs-manager@1.6.4
|
||||
minifier-css@1.2.15
|
||||
minifier-js@1.2.15
|
||||
minimongo@1.0.19
|
||||
|
@ -63,28 +61,15 @@ modules@0.7.7
|
|||
modules-runtime@0.7.7
|
||||
mongo@1.1.14
|
||||
mongo-id@1.0.6
|
||||
nova:api@0.27.4-nova
|
||||
nova:apollo@0.27.4-nova
|
||||
nova:base-components@0.27.4-nova
|
||||
nova:base-styles@0.27.4-nova
|
||||
nova:categories@0.27.4-nova
|
||||
nova:comments@0.27.4-nova
|
||||
nova:core@0.27.4-nova
|
||||
nova:email@0.27.4-nova
|
||||
nova:embedly@0.27.4-nova
|
||||
nova:events@0.27.4-nova
|
||||
nova:forms@0.27.4-nova
|
||||
nova:getting-started@0.27.4-nova
|
||||
nova:i18n-en-us@0.27.4-nova
|
||||
nova:lib@0.27.4-nova
|
||||
nova:newsletter@0.27.4-nova
|
||||
nova:notifications@0.27.4-nova
|
||||
nova:posts@0.27.4-nova
|
||||
nova:routing@0.27.4-nova
|
||||
nova:rss@0.27.4-nova
|
||||
nova:search@0.27.4-nova
|
||||
nova:users@0.27.4-nova
|
||||
nova:voting@0.27.4-nova
|
||||
npm-bcrypt@0.9.2
|
||||
npm-mongo@2.2.11_2
|
||||
observe-sequence@1.0.14
|
||||
|
@ -118,6 +103,5 @@ tracker@1.1.1
|
|||
ui@1.0.12
|
||||
underscore@1.0.10
|
||||
url@1.0.11
|
||||
utilities:react-list-container@0.1.14
|
||||
webapp@1.3.12
|
||||
webapp-hashing@1.0.9
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
import Telescope from 'meteor/nova:lib';
|
||||
import {Inject} from 'meteor/meteorhacks:inject-initial';
|
||||
import Events from "meteor/nova:events";
|
||||
|
||||
const Events = new Mongo.Collection('events');
|
||||
|
||||
Meteor.startup(function () {
|
||||
Events.log({
|
||||
name: "firstRun",
|
||||
unique: true, // will only get logged a single time
|
||||
important: true
|
||||
});
|
||||
if (!Events.findOne({name: 'firstRun'})) {
|
||||
Events.insert({
|
||||
name: 'firstRun',
|
||||
unique: true, // will only get logged a single time
|
||||
important: true,
|
||||
createdAt: new Date(),
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (Telescope.settings.get('mailUrl')) {
|
||||
|
@ -15,7 +19,7 @@ if (Telescope.settings.get('mailUrl')) {
|
|||
}
|
||||
|
||||
Meteor.startup(function() {
|
||||
if (typeof SyncedCron !== "undefined") {
|
||||
if (typeof SyncedCron !== 'undefined') {
|
||||
SyncedCron.start();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -10,8 +10,7 @@ Package.onUse(function(api) {
|
|||
api.versionsFrom("METEOR@1.0");
|
||||
|
||||
api.use([
|
||||
'nova:lib@0.27.4-nova',
|
||||
'nova:events@0.27.4-nova'
|
||||
'nova:lib@0.27.4-nova'
|
||||
]);
|
||||
|
||||
api.imply([
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
/*
|
||||
|
||||
Main form component.
|
||||
|
||||
This component expects:
|
||||
|
||||
### All Forms:
|
||||
|
||||
- collection
|
||||
- currentUser
|
||||
- client (Apollo client)
|
||||
|
||||
### New Form:
|
||||
|
||||
- newMutation
|
||||
|
||||
### Edit Form:
|
||||
|
||||
- editMutation
|
||||
- removeMutation
|
||||
- document
|
||||
|
||||
*/
|
||||
|
||||
import Telescope from 'meteor/nova:lib';
|
||||
import React, { PropTypes, Component } from 'react';
|
||||
import { FormattedMessage, intlShape } from 'react-intl';
|
||||
|
@ -490,7 +514,6 @@ FormWithMutations.propTypes = {
|
|||
collection: React.PropTypes.object,
|
||||
document: React.PropTypes.object, // if a document is passed, this will be an edit form
|
||||
schema: React.PropTypes.object, // usually not needed
|
||||
fieldGroups: React.PropTypes.array,
|
||||
|
||||
// graphQL
|
||||
newMutation: React.PropTypes.func, // the new mutation
|
||||
|
|
|
@ -1,3 +1,29 @@
|
|||
/*
|
||||
|
||||
Generate the appropriate fragment for the current form, then
|
||||
wrap the main Form component with the necessary HoCs while passing
|
||||
them the fragment.
|
||||
|
||||
This component is itself wrapped with:
|
||||
|
||||
- withCurrentUser
|
||||
- withApollo (used to access the Apollo client for form pre-population)
|
||||
|
||||
And wraps the Form component with:
|
||||
|
||||
- withNew
|
||||
|
||||
Or:
|
||||
|
||||
- withSingle
|
||||
- withEdit
|
||||
- withRemove
|
||||
|
||||
(When wrapping with withSingle, withEdit, and withRemove, a special Loader
|
||||
component is also added to wait for withSingle's loading prop to be false)
|
||||
|
||||
*/
|
||||
|
||||
import Telescope from 'meteor/nova:lib';
|
||||
import React, { PropTypes, Component } from 'react';
|
||||
import { intlShape } from 'react-intl';
|
||||
|
@ -124,15 +150,6 @@ class FormWithSingle extends Component{
|
|||
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
// note: patch to cancel closeCallback given by parent
|
||||
// we clean the event by hand
|
||||
// example : the closeCallback is a function that closes a modal by calling setState, this modal being the parent of this NovaForm component
|
||||
// if this componentWillUnmount hook is triggered, that means that the modal doesn't exist anymore!
|
||||
// let's not call setState on an unmounted component (avoid no-op / memory leak)
|
||||
this.context.closeCallback = f => f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FormWithSingle.propTypes = {
|
||||
|
|
|
@ -10,6 +10,8 @@ Package.onUse(function(api) {
|
|||
api.versionsFrom("METEOR@1.3");
|
||||
|
||||
api.use([
|
||||
'nova:core@0.27.4-nova',
|
||||
|
||||
'ecmascript',
|
||||
'check',
|
||||
'aldeed:simple-schema@1.5.3',
|
||||
|
|
Loading…
Add table
Reference in a new issue