-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from jhicken/master
cleaning up example and some spacing issues
- Loading branch information
Showing
9 changed files
with
215 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
import React, {Component} from 'react' | ||
import React from 'react' | ||
import {render} from 'react-dom' | ||
import {} from './cards' | ||
import {CardList} from '../src/components' | ||
import {buildCards} from './cards' | ||
import {AppContainer} from 'react-hot-loader' | ||
import { Root } from '../src/' | ||
import { ReactCardsRoot } from '../src' | ||
|
||
buildCards(); | ||
|
||
if (module.hot) { | ||
module.hot.accept() | ||
window.describe = (text, fn) => fn() | ||
window.it = (text, fn) => fn() | ||
} | ||
|
||
const renderCards = () => | ||
render(<AppContainer><Root /></AppContainer>, window.mountNode) | ||
|
||
const run = renderCards | ||
|
||
run() | ||
render( | ||
<AppContainer> | ||
<ReactCardsRoot /> | ||
</AppContainer>, | ||
window.mountNode | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,41 @@ | ||
var path = require('path') | ||
module.exports = { | ||
//devtool: 'source-map', | ||
context: path.join(__dirname, ""), | ||
entry: [ | ||
'webpack/hot/only-dev-server', | ||
'react-hot-loader/patch', | ||
'./main', | ||
], | ||
output: { | ||
filename: "app.js", | ||
path: path.join(__dirname, "public"), | ||
}, | ||
//devtool: 'source-map', | ||
context: path.join(__dirname, ""), | ||
entry: [ | ||
'webpack/hot/only-dev-server', | ||
'react-hot-loader/patch', | ||
'./main', | ||
], | ||
output: { | ||
filename: "app.js", | ||
path: path.join(__dirname, "public"), | ||
}, | ||
|
||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
loaders: ['babel?{presets:["es2015", "react", "stage-2"], plugins:["react-hot-loader/babel"]}'], | ||
}, | ||
{ | ||
test: /\.css$/, | ||
loader: "style-loader!css-loader" | ||
}, | ||
{ | ||
test: /\.less$/, | ||
loader: "style-loader!css-loader!less-loader" | ||
} | ||
], | ||
}, | ||
module: { | ||
loaders: [{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
loaders: ['babel?{presets:["es2015", "react", "stage-2"], plugins:["react-hot-loader/babel"]}'], | ||
}, { | ||
test: /\.css$/, | ||
loader: "style-loader!css-loader" | ||
}, { | ||
test: /\.less$/, | ||
loader: "style-loader!css-loader!less-loader" | ||
}], | ||
}, | ||
|
||
node: { | ||
fs: "empty", | ||
}, | ||
node: { | ||
fs: "empty", | ||
}, | ||
|
||
// we need this because of enzyme | ||
// see https://github.com/airbnb/enzyme/blob/master/docs/guides/webpack.md | ||
externals: { | ||
'cheerio': 'window', | ||
'react/addons': true, | ||
'react/lib/ExecutionEnvironment': true, | ||
'react/lib/ReactContext': true, | ||
}, | ||
// we need this because of enzyme | ||
// see https://github.com/airbnb/enzyme/blob/master/docs/guides/webpack.md | ||
externals: { | ||
'cheerio': 'window', | ||
'react/addons': true, | ||
'react/lib/ExecutionEnvironment': true, | ||
'react/lib/ReactContext': true, | ||
}, | ||
}; |
Oops, something went wrong.