GitXplorerGitXplorer
r

nwa-react-redux-boilerplate

public
1 stars
0 forks
4 issues

Commits

List of commits on branch master.
Unverified
8eaca190e8ff592c1f35fd604bf4fcc436ab82e0

Merge pull request #11 from ro-savage/feature/layout

rro-savage committed 8 years ago
Unverified
0de489f7f19601f2c1b5ebbd2771be4f1d63955e

Changed to use flexgrid

rro-savage committed 8 years ago
Unverified
a7d6e9b4d3e99bb8f169998212153edc067a4ecb

Merge master into feature/layout

rro-savage committed 8 years ago
Unverified
e2470b0300aad41a4ee210ff0446a8574f63f5f8

Merge pull request #10 from ro-savage/feature/loginpage

rro-savage committed 8 years ago
Unverified
b3b39f35a2dcd89c944f03a37255c86f03d271c1

Added missing dependency

rro-savage committed 8 years ago
Unverified
ad3c849956cd83617407156daef5d8179359ac49

Changed back to PhantomJS for karma

rro-savage committed 8 years ago

README

The README file for this repository.

Build Status

Node With Attiude React/Redux Boilerplate

WORK IN PROGRESS - DO NOT USE

This is very heavily based on the opencredo-react-boilerplate which is heavily based on the react-redux-starter-kit

This contains a number of changes to make the starter kits work better for our exact configuation. It may be useful to you. It may not. At this time the docs have not been updated.

Changes are:

  • react-toolbox replaces react-bootstrap, for a material design look
  • Updating linting to use airbnb with semi-colons
  • Updated layout structure
  • Emezyne and expect added to testing framework
  • Add Ramda support and use in preference to lodash
  • Added support for redux-cli (coming soon)
  • Added immutableJS (comsing soon)
  • Replace axios with fetch (coming soon)
  • Replace react-transform-hmr with react-hot-loader. See redux issue#1455 (coming soon)
  • Updated support for react-intl (coming soon)
  • Remove flowtype

Features

Usage

First time

Clone this repo, then run npm install.

Windows users need to follow the instructions in FLOWTYPE.md to install the flow binaries.

Development

When you're developing, start webpack as follows:

npm run start       # standard development
npm run start:bs    # as above, but with browser-sync

Then open a browser at http://localhost:3000/.

Some useful commands:

npm run lint        # execute the eslint process on the codebase
npm run karma       # execute just the unit tests
npm run flow-check  # alias for `flow check`
npm run test        # execute flow checks, eslint and unit tests
npm run build       # run this just before you commit - the Travis-CI job runs this command

Most editors will report lint and type errors if properly configured. If you need help setting up your editor, we've put together a few tips for some of the more popular ones in the Editors document. If your editor is not listed and you'd like to contribute some tips, feel free to make a PR :-)

Production

To test a production build:

npm run build && (cd dist && python -m SimpleHTTPServer)

Then open a browser at http://localhost:8000/.

Directory Structure

.
├── config                      # Config: mostly used by build & webpack
│   ├── environments/           # Config overrides for different NODE_ENVs
│   └── index.js                # Config entry point. Modify to suit your needs
├── dist/                       # Built artifacts get put here (e.g. webpack.output)
├── server/                     # Express server files go here
│   ├── index.js                # Launches the express() server with webpack-hmr
├── src                         # The source code of the application
│   ├── api/                    # Modules that make API service calls
│   ├── components/             # React [functional|dumb|stateless] components
│   ├── containers/             # React "container" components (connected to store)
│   ├── declarations/           # Flowtype declarations would go here, if necessary
│   ├── pages/                  # Pages: React Components that live in routes
│   ├── redux/                  # Here we configure our redux stores, actions, reducers...
│   │   ├── modules/            # Redux modules would be collections of reducers + actions
│   │   ├── configure-store.js  # Redux store configured here (middleware, initial state, reducers...)
│   │   └── root-reducer.js     # Here we combine all our reducers
│   ├── shared/                 # Shared resources
│   ├── static/                 # Static assets. Some call this `public/`
│   ├── styles/                 # Global CSS styles (class names left intact)
│   ├── translations/           # Our i18n translations go here
│   ├── app.js                  # Application entry point
│   ├── app-config.js           # Global application settings
│   ├── index.html              # index.html template
│   └── routes.js               # All our routes
├── karma.conf.js               # (self explanatory)
├── package.json                # (self explanatory)
├── tests.karma.js              # (self explanatory)
└── webpack.config.js           # (self explanatory)

Note: see Dan Abramov's explanation about "Smart and Dumb Components".