kyt-starter-universal
Advanced tools
Comparing version 0.3.0 to 0.4.0-rc.1
{ | ||
"name": "kyt-starter-universal", | ||
"version": "0.3.0", | ||
"version": "0.4.0-rc.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -1,2 +0,1 @@ | ||
// Base kyt config. | ||
@@ -3,0 +2,0 @@ // Edit these properties to make changes. |
@@ -26,5 +26,5 @@ { | ||
"enzyme": "2.4.1", | ||
"kyt": "0.6.0", | ||
"kyt": "0.7.0-rc.2", | ||
"react-addons-test-utils": "15.3.0" | ||
} | ||
} |
@@ -1,2 +0,1 @@ | ||
// This is your prototyping file. | ||
@@ -13,5 +12,2 @@ // It is the entry for the webpack dev server | ||
const rootEl = document.getElementById('root'); | ||
ReactDom.render( | ||
<Home />, | ||
rootEl | ||
); | ||
ReactDom.render(<Home />, rootEl); |
@@ -1,2 +0,1 @@ | ||
import React from 'react'; | ||
@@ -9,3 +8,3 @@ import { render } from 'react-dom'; | ||
const mount = (RootComponent) => { | ||
const mount = RootComponent => { | ||
render( | ||
@@ -12,0 +11,0 @@ <AppContainer> |
@@ -1,2 +0,1 @@ | ||
import React from 'react'; | ||
@@ -9,7 +8,5 @@ import Router from 'react-router/lib/Router'; | ||
function Root() { | ||
return ( | ||
<Router history={browserHistory} routes={routes} /> | ||
); | ||
return <Router history={browserHistory} routes={routes} />; | ||
} | ||
export default Root; |
@@ -1,2 +0,1 @@ | ||
import React, { PropTypes } from 'react'; | ||
@@ -3,0 +2,0 @@ import Link from 'react-router/lib/Link'; |
@@ -1,3 +0,1 @@ | ||
import React from 'react'; | ||
@@ -4,0 +2,0 @@ import { shallow } from 'enzyme'; |
@@ -1,2 +0,1 @@ | ||
import React from 'react'; | ||
@@ -3,0 +2,0 @@ import styles from './styles.scss'; |
@@ -1,3 +0,1 @@ | ||
import React from 'react'; | ||
@@ -4,0 +2,0 @@ import { shallow } from 'enzyme'; |
@@ -1,2 +0,1 @@ | ||
import React from 'react'; | ||
@@ -15,6 +14,8 @@ import styles from './styles.scss'; | ||
<li className={styles.tool}> | ||
<a href="https://github.com/reactjs/react-router">React Router</a> - server and browser routing | ||
<a href="https://github.com/reactjs/react-router">React Router</a> - server and browser | ||
routing | ||
</li> | ||
<li className={styles.tool}> | ||
<a href="https://github.com/css-modules/css-modules">Sass Modules</a> - CSS Modules with a Sass pre-processor for styles | ||
<a href="https://github.com/css-modules/css-modules">Sass Modules</a> - CSS Modules with a | ||
Sass pre-processor for styles | ||
</li> | ||
@@ -21,0 +22,0 @@ <li className={styles.tool}> |
@@ -1,3 +0,1 @@ | ||
import React from 'react'; | ||
@@ -4,0 +2,0 @@ import { shallow } from 'enzyme'; |
@@ -1,2 +0,1 @@ | ||
import React from 'react'; | ||
@@ -14,9 +13,13 @@ import Route from 'react-router/lib/Route'; | ||
.then(module => cb(null, module.default)) | ||
.catch((e) => { throw e; }); | ||
.catch(e => { | ||
throw e; | ||
}); | ||
}; | ||
const importTools = (nextState, cb) => { | ||
import(/* webpackChunkName: "tools" */'../components/Tools') | ||
import(/* webpackChunkName: "tools" */ '../components/Tools') | ||
.then(module => cb(null, module.default)) | ||
.catch((e) => { throw e; }); | ||
.catch(e => { | ||
throw e; | ||
}); | ||
}; | ||
@@ -37,6 +40,6 @@ | ||
if (module.hot) { | ||
require('../components/Home'); // eslint-disable-line global-require | ||
require('../components/Tools'); // eslint-disable-line global-require | ||
require('../components/Home'); // eslint-disable-line global-require | ||
require('../components/Tools'); // eslint-disable-line global-require | ||
} | ||
export default routes; |
@@ -1,2 +0,1 @@ | ||
import express from 'express'; | ||
@@ -38,9 +37,11 @@ import compression from 'compression'; | ||
// the components and assets into the template. | ||
response.status(200).send(template({ | ||
root: renderToString(<RouterContext {...renderProps} />), | ||
manifestJSBundle: clientAssets['manifest.js'], | ||
mainJSBundle: clientAssets['main.js'], | ||
vendorJSBundle: clientAssets['vendor.js'], | ||
mainCSSBundle: clientAssets['main.css'], | ||
})); | ||
response.status(200).send( | ||
template({ | ||
root: renderToString(<RouterContext {...renderProps} />), | ||
manifestJSBundle: clientAssets['manifest.js'], | ||
mainJSBundle: clientAssets['main.js'], | ||
vendorJSBundle: clientAssets['vendor.js'], | ||
mainCSSBundle: clientAssets['main.css'], | ||
}) | ||
); | ||
} else { | ||
@@ -47,0 +48,0 @@ response.status(404).send('Not found'); |
@@ -19,3 +19,5 @@ /* eslint-disable prefer-template, max-len */ | ||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"> | ||
${vo.mainCSSBundle ? '<link rel="stylesheet" type="text/css" href="' + vo.mainCSSBundle + '">' : ''} | ||
${vo.mainCSSBundle | ||
? '<link rel="stylesheet" type="text/css" href="' + vo.mainCSSBundle + '">' | ||
: ''} | ||
@@ -22,0 +24,0 @@ <title>Universal React Starter Kyt</title> |
510837
246