mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-07-05 03:21:00 +08:00
Added base webpack configuration and needed shellscripts.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# About this folder
|
||||
This folder will hold all of your **flux** actions if you are using flux.
|
||||
You can include actions into your components or stores like this:
|
||||
|
||||
```javascript
|
||||
let react = require('react/addons');
|
||||
let MyAction = require('actions/MyAction');
|
||||
class MyComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
MyAction.exampleMethod();
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
require('normalize.css');
|
||||
require('styles/App.css');
|
||||
|
||||
import React from 'react/addons';
|
||||
|
||||
class AppComponent extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
Content
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
AppComponent.defaultProps = {
|
||||
};
|
||||
|
||||
export default AppComponent;
|
||||
@@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
import App from './Main';
|
||||
|
||||
// Render the main component into the dom
|
||||
React.render(<App />, document.getElementById('app'));
|
||||
@@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>React Webpack Template Title</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">APPLICATION CONTENT</div>
|
||||
|
||||
<script>__REACT_DEVTOOLS_GLOBAL_HOOK__ = parent.__REACT_DEVTOOLS_GLOBAL_HOOK__</script>
|
||||
<script type="text/javascript" src="assets/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
# About this folder
|
||||
This folder will hold all of your **flux** datasources.
|
||||
You can include them into your components or stores like this:
|
||||
|
||||
```javascript
|
||||
let react = require('react/addons');
|
||||
let MySource = require('sources/MyAction');
|
||||
class MyComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
MySource.getRemoteData();
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,14 @@
|
||||
# About this folder
|
||||
This folder will hold all of your **flux** stores.
|
||||
You can include them into your components like this:
|
||||
|
||||
```javascript
|
||||
let react = require('react/addons');
|
||||
let MyStore = require('stores/MyStore');
|
||||
class MyComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
MyStore.doSomething();
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
/* Base Application Styles */
|
||||
Reference in New Issue
Block a user