forked from soyking/e3w
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
108 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/ | ||
node_modules/ | ||
*.log |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"devDependencies": { | ||
"babel-core": "^6.14.0", | ||
"babel-loader": "^6.2.5", | ||
"babel-plugin-antd": "^0.5.1", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-preset-react": "^6.11.1", | ||
"css-loader": "^0.25.0", | ||
"html-webpack-plugin": "^2.22.0", | ||
"style-loader": "^0.13.1", | ||
"webpack": "^1.13.2" | ||
}, | ||
"dependencies": { | ||
"antd": "^1.11.0", | ||
"react": "15.1.0", | ||
"react-dom": "15.1.0", | ||
"react-polymer-layout": "^0.2.17", | ||
"react-router": "^2.8.1" | ||
}, | ||
"scripts": { | ||
"watch": "./node_modules/webpack/bin/webpack.js --watch", | ||
"build": "./node_modules/webpack/bin/webpack.js" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
|
||
const App = React.createClass({ | ||
render() { | ||
return ( | ||
<div>app</div> | ||
) | ||
} | ||
}) | ||
|
||
module.exports = App |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
|
||
const KeyValue = React.createClass({ | ||
render() { | ||
return ( | ||
<div>key value</div> | ||
) | ||
} | ||
}) | ||
|
||
module.exports = KeyValue |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { hashHistory, Router, Route, IndexRedirect } from 'react-router' | ||
import App from './components/App.jsx' | ||
import KeyValue from './components/KeyValue.jsx' | ||
|
||
ReactDOM.render(( | ||
<Router history={hashHistory}> | ||
<Route path="/" component={App}> | ||
<IndexRedirect to="kv" /> | ||
<Route path="kv" component={KeyValue} /> | ||
</Route> | ||
</Router> | ||
), document.querySelector(".root")) |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>ETCD V3 WEB UI</title> | ||
<section class="root"></section> | ||
<script src="public/dist/bundle.js"></script> |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
var path = require('path'); | ||
var HtmlWebpackPlugin = require('html-webpack-plugin') | ||
|
||
module.exports = { | ||
devtool: "inline-source-map", | ||
entry: './src/entry.jsx', | ||
output: { | ||
path: path.join(__dirname, '/dist'), | ||
filename: 'bundle.js' | ||
}, | ||
resolve: { | ||
extensions: ['', '.js', '.jsx'] | ||
}, | ||
module: { | ||
loaders: [{ | ||
test: /.jsx$/, | ||
loader: 'babel', | ||
exclude: /node_modules/, | ||
query: { | ||
presets: ['react', 'es2015'], | ||
plugins: ['antd'] | ||
} | ||
}, { | ||
test: /\.css$/, | ||
loader: 'style-loader!css-loader' | ||
}] | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
filename: 'index.html', | ||
template: './src/index.html', | ||
inject: false, | ||
}), | ||
] | ||
} |