项目作者: fredguile

项目描述 :
My own starter kit for making a React/Redux web application
高级语言: JavaScript
项目地址: git://github.com/fredguile/react-redux-es2015-starter-kit.git
创建时间: 2016-01-05T10:08:17Z
项目社区:https://github.com/fredguile/react-redux-es2015-starter-kit

开源协议:MIT License

下载


DEPRECATED - react-redux-es2015-starter-kit

[Obviously given its age, this project is no longer actively maintained]

My own starter kit for making a React/Redux web application using Webpack and ES2015.
Feel free to fork this repo to start your own project.

NOTE: as this has been written in 2016, I wish you consider newer options. I’m just keeping the repo for the record.

Features:

  • Written in ECMAScript 2015, transpiled by Babel 6.
  • Compiled using Webpack for both server and client-side code.
  • Generating sourcemaps for backend & client code during development.
  • Using my own cluster management library cluster-respawn.
  • React with server side rendering on expressjs backend.
  • React-router for isomorphic routing.
  • Redux Flux with atomic immutable.js app state.
  • Hot reloading of client modules and reducers using React-Hot-Loader.
  • Shared cluster configuration managed by Shared-Store.
  • Bootstrap integration for styling.
  • Eslint integration.
  • Server auto restart, or restart-on-demand using “make reload”.

Quick Start

This starter kit has been optimized for Node 4.x and NPM 3.x. Of course, you can run it with Node 5.x.

  1. git clone https://github.com/fredguile/react-redux-es2015-starter-kit.git
  2. cd react-redux-es2015-starter-kit
  3. make setup
  4. make dev

Open it in your browser http://localhost:3000.

File Structure

My proposed app structure as following:

  1. react-redux-es2015-starter-kit/
  2. ├──app/ * project files
  3. ├──components/ * some React components as example
  4. ├──core/ * default app behavior
  5. ├──bootstrap.js * master & workers processes initialization script
  6. └──frontend/ * client-side bootstrap code & main CSS
  7. ├──modules/ * proposed folder for app modules
  8. └──todoList/ * our infamous todo example using Redux
  9. ├──build/ * webpack build for backend code (optimized for Node 4.x)
  10. ├──config/ * configuration files
  11. ├──public/ * static files served by Express
  12. ├──tasks/ * Gulp tasks for building project and starting server
  13. ├──tmp/ * Temperary copy of the shared configuration
  14. ├──index.js * Node start script
  15. ├──Makefile * For managing server lifecycle using make commands
  16. ├──master.pid * Master PID file (when server is started)
  17. ├──worker-X.pid * Workers PID file (when server is started)
  18. └──package.json * npm configuration