Skip to content

Commit cde2bb0

Browse files
author
David Zukowski
committed
refactor(all): ports progress from a recent project that better supports isomorphic rendering
1 parent b71d6d7 commit cde2bb0

File tree

37 files changed

+306
-223
lines changed

37 files changed

+306
-223
lines changed

.eslintrc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
"destructuring": 1
1111
},
1212
"globals": {
13-
"__DEV__" : false,
14-
"__PROD__" : false
13+
"__DEV__" : false,
14+
"__PROD__" : false,
15+
"__CLIENT__" : false,
16+
"__SERVER__" : false
1517
},
1618
"plugins": [],
1719
"rules": {
@@ -67,7 +69,7 @@
6769
"no-labels": 2,
6870
"no-lone-blocks": 2,
6971
"no-loop-func": 2,
70-
"no-multi-spaces": [1, {
72+
"no-multi-spaces": [0, {
7173
"exceptions": {}
7274
}],
7375
"no-multi-str": 2,
@@ -104,7 +106,7 @@
104106
"no-undef": 2,
105107
"no-undef-init": 0,
106108
"no-undefined": 2,
107-
"no-unused-vars": 1,
109+
"no-unused-vars": 0,
108110
"no-use-before-define": 2,
109111

110112
"array-bracket-spacing": 0,
@@ -149,7 +151,6 @@
149151
"no-spaced-func": 2,
150152
"no-ternary": 0,
151153
"no-trailing-spaces": 1,
152-
"no-multiple-empty-lines": 1,
153154
"no-underscore-dangle": 0,
154155
"no-unneeded-ternary": 2,
155156
"object-curly-spacing": [1, "always"],
@@ -191,7 +192,7 @@
191192
"no-this-before-super": 2,
192193
"no-var": 0,
193194
"object-shorthand": 0,
194-
"perfer-const": 1,
195+
"prefer-const": 1,
195196

196197
"max-depth": [2, 3],
197198
"max-len": [2, 80, 2],

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
language: node_js
22
node_js:
3+
- "0.12"
34
- "iojs"
45

56
install:
67
- npm install
78

89
script:
9-
- npm run deploy
10+
- NODE_ENV=production npm run deploy

LICENSE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in
13-
all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
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,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,2 @@
1-
< Wirk />
2-
=========
3-
[![Build Status](https://travis-ci.org/davezuko/wirk-starter.svg?branch=master)](https://travis-ci.org/davezuko/wirk-starter/)
4-
5-
A basic starter kit that gives you just enough boilerplate to start building Isomorphic React applications with Koa.js, while staying out of your way.
6-
7-
Requirements
8-
------------
9-
IO.js is recommended, with --harmony flag enabled if you're not using our predefined npm scripts.
10-
11-
Features
12-
--------
13-
* Webpack
14-
* Separate client and server bundles
15-
* Default loaders for `.js`, `.jsx` and `.css` (relax, it's with PostCSS)
16-
* Hot Module Replacement with the help of React Hot Loader
17-
* Development scripts to enable live-reloading with hot module replacement
18-
* Koa.js as a back-end server
19-
* Jade for html pre-processing
20-
* Easy environment-specific configuration, which already includes:
21-
* Client bundle splitting in production mode
22-
* CSS Extraction in production mode
23-
24-
Installation
25-
-------------
26-
27-
Install project dependencies with:
28-
```
29-
npm run setup
30-
```
31-
32-
Once this is done, you can either run the development server with
33-
34-
```
35-
npm run dev
36-
37-
// or
38-
39-
npm run dev:quiet // disables verbose debugging
40-
```
41-
42-
or compile the application to disk for use with the server
43-
44-
```
45-
npm run build && npm run server:start
46-
```
47-
48-
Configuration
49-
-------------
50-
Basic project configuration can be found in `~/confg/index.js` and includes options for source and dist directories, default ports, and a list of vendor dependencies (used for bundle splitting during client compilation). In the future this file will hopefully become more powerful so that the application can be more heavily tweaked without having to dig through the source.
1+
Isomorphic React Webpack Starter Kit
2+
====================================

app/components/app/index.jsx

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

app/entry-points/client.js

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

app/entry-points/server.js

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

app/styles/core.css

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default (config) => {
2+
config.singleRun = false;
3+
4+
return config;
5+
};

build/karma/configs/_production.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { DIST_DIRNAME } from '../../../config';
2+
3+
export default (config) => {
4+
config.singleRun = true;
5+
config.reporters = ['spec', 'coverage'];
6+
config.coverageReporter = {
7+
type : 'html',
8+
dir : `${DIST_DIRNAME}/coverage/`
9+
};
10+
11+
return config;
12+
};

0 commit comments

Comments
 (0)