Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 4baa939

Browse files
committed
Nova 1.0.0 stable on master
2 parents 9193de0 + cf0f8b8 commit 4baa939

File tree

193 files changed

+2238
-2137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+2238
-2137
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ bundle.tar.gz
4747
jsdoc-conf.json
4848
jsdoc.json
4949
packages/nova-router/.npm
50+
npm-debug.log

.meteor/versions

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ callback-hook@1.0.10
1919
check@1.2.4
2020
chuangbo:cookie@1.1.0
2121
coffeescript@1.11.1_4
22-
customization-demo@0.0.0
2322
dburles:collection-helpers@1.1.0
2423
ddp@1.2.5
2524
ddp-client@1.3.2
@@ -34,7 +33,6 @@ ejson@1.0.13
3433
email@1.1.18
3534
fortawesome:fontawesome@4.5.0
3635
fourseven:scss@3.10.1
37-
framework-demo@0.0.0
3836
geojson-utils@1.0.10
3937
hot-code-push@1.0.4
4038
html-tools@1.0.11

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- Come check-in in the [Telescope Slack channel](http://slack.telescopeapp.org/). 👋
44

5-
- Completely new features should be shipped as external packages with their own repos (see [3rd party packages](https://github.com/TelescopeJS/Telescope#third-party-plugins)). Don't hesitate to come by the [Slack channel](http://slack.telescopeapp.org/) to speak about it.
5+
- Completely new features should be shipped as external packages with their own repos (see [3rd party packages](http://nova-docs.telescopeapp.org/plugins.html)). Don't hesitate to come by the [Slack channel](http://slack.telescopeapp.org/) to speak about it.
66

77
- We don't have test at the moment, and Travis integration is broken. If you know how to fix it, you are welcome (see [#1253](https://github.com/TelescopeJS/Telescope/issues/1253)!
88

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
This is the Apollo/GraphQL version of Telescope Nova. [You can find the documentation here](http://nova-docs.telescopeapp.org/).
66

7+
The fastest way to get started is:
8+
```sh
9+
npm install
10+
npm start
11+
```
12+
713
### Other Versions
814

915
You can find the older, non-Apollo version of Telescope Nova on the [nova-classic](https://github.com/TelescopeJS/Telescope/tree/nova-classic) branch.

license.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Telescope Nova
3+
Copyright (c) 2017 Telescope Nova
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

npm-debug.log.14739240

Lines changed: 0 additions & 25 deletions
This file was deleted.

npm-debug.log.748773427

Lines changed: 0 additions & 25 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
"npm": "^3.0"
66
},
77
"scripts": {
8+
"prestart": "sh prestart_nova.sh",
9+
"start": "meteor --settings settings.json",
810
"lint": "eslint --cache --ext .jsx,js packages"
911
},
1012
"dependencies": {
11-
"apollo-client": "^0.7.3",
13+
"analytics-node": "^2.1.1",
14+
"apollo-client": "^0.8.1",
1215
"babel-runtime": "^6.18.0",
1316
"bcrypt": "^0.8.7",
1417
"body-parser": "^1.15.2",
@@ -44,7 +47,7 @@
4447
"optics-agent": "^1.0.5",
4548
"react": "^15.4.1",
4649
"react-addons-pure-render-mixin": "^15.4.1",
47-
"react-apollo": "^0.8.1",
50+
"react-apollo": "^0.9.0",
4851
"react-bootstrap": "^0.30.7",
4952
"react-bootstrap-datetimepicker": "0.0.22",
5053
"react-cookie": "^0.4.6",

packages/_react-router-ssr/lib/client.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ const ReactRouterSSR = {
99
clientOptions = {};
1010
}
1111

12-
let history = browserHistory;
13-
14-
if(typeof clientOptions.historyHook === 'function') {
15-
history = clientOptions.historyHook(history);
16-
}
17-
1812
Meteor.startup(function() {
1913
const rootElementName = clientOptions.rootElement || 'react-app';
2014
const rootElementType = clientOptions.rootElementType || 'div';
@@ -47,6 +41,12 @@ const ReactRouterSSR = {
4741
});
4842
}
4943

44+
let history = browserHistory;
45+
46+
if(typeof clientOptions.historyHook === 'function') {
47+
history = clientOptions.historyHook(history);
48+
}
49+
5050
let app = (
5151
<Router
5252
history={history}

packages/_react-router-ssr/lib/server.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ReactRouterSSR.Run = function(routes, clientOptions, serverOptions) {
7979
let history = createMemoryHistory(req.url);
8080

8181
if (typeof serverOptions.historyHook === 'function') {
82-
history = serverOptions.historyHook(history);
82+
history = serverOptions.historyHook(req, res, history);
8383
}
8484

8585
ReactRouterMatch({ history, routes, location: req.url }, Meteor.bindEnvironment((err, redirectLocation, renderProps) => {
@@ -194,6 +194,7 @@ function generateSSRData(clientOptions, serverOptions, req, res, renderProps) {
194194

195195
global.__STYLE_COLLECTOR_MODULES__ = [];
196196
global.__STYLE_COLLECTOR__ = '';
197+
req.css = '';
197198

198199
renderProps = {
199200
...renderProps,
@@ -203,9 +204,9 @@ function generateSSRData(clientOptions, serverOptions, req, res, renderProps) {
203204
// fetchComponentData(serverOptions, renderProps);
204205
let app = <RouterContext {...renderProps} />;
205206

206-
if (typeof clientOptions.wrapperHook === 'function') {
207+
if (typeof serverOptions.wrapperHook === 'function') {
207208
const loginToken = req.cookies['meteor_login_token'];
208-
app = clientOptions.wrapperHook(app, loginToken);
209+
app = serverOptions.wrapperHook(req, res, app, loginToken);
209210
}
210211

211212
if (serverOptions.preRender) {
@@ -221,14 +222,16 @@ function generateSSRData(clientOptions, serverOptions, req, res, renderProps) {
221222
css = global.__STYLE_COLLECTOR__;
222223

223224
if (typeof serverOptions.dehydrateHook === 'function') {
224-
const data = serverOptions.dehydrateHook();
225+
const data = serverOptions.dehydrateHook(req, res);
225226
InjectData.pushData(res, 'dehydrated-initial-data', JSON.stringify(data));
226227
}
227228

228229
if (serverOptions.postRender) {
229230
serverOptions.postRender(req, res);
230231
}
231232

233+
css = css + req.css;
234+
232235
// I'm pretty sure this could be avoided in a more elegant way?
233236
const context = FastRender.frContext.get();
234237
const data = context.getData();

0 commit comments

Comments
 (0)