An opinionated react+redux starter kit.
Mainly:
- react (
v0.14.2
) - react-router (
v1.0.0
) - redux (
v3.0.4
) - react-redux (
v4.0.0
) - redux-simple-router (
v1.0.2
) - redux-thunk (
v1.0.0
) - classnames (
v2.2.0
) - axios (
v0.7.0
) - koa (
v1.1.2
)
Development:
- webpack
- babel (
v6.1.5
) - karma (
v0.13.15
) - mocha (
v2.3.4
) - chai (
v3.4.1
) - sinon (
v1.17.2
) - redux-devtools (
v3.0.0-beta-3
) - redux-devtools-log-monitor (
v1.0.0-beta-3
)
- Where's my
actions
,reducers
, andconstants
? This repository follows ducks-modular-redux.
Some requirements include:
Afterwards, clone, and then run the following to install the dependencies:
npm install
bundle install
command | description |
---|---|
npm run watch:script |
watch for file changes and compile scripts |
npm run watch:style |
watch for file changes and compile stylesheets |
npm run dev |
runs watch:script and watch:style |
npm run server |
run server-side rendering |
npm start |
production-ready assets / run server |
npm watch:test |
watches for file changes and runs test |
npm test |
run tests |
We use dotenv configuration.
Note: If you don't have any .env
file in the project root directory, run this: cp .env.example .env
.
config | description |
---|---|
process.env.NODE_ENV |
Environment. |
process.env.API |
The URI of the API. Mainly used to concatenate the requests with a base URI in common/utils/axios/interceptors/concatBaseUrl . |
process.env.IMG |
Path to the images folder. This can be used as such : ${_IMG_}/cat.jpg . |
process.env.PORT |
The port which the server will be ran. This is a server-only config. |
process.env.REDUX_DEVTOOLS |
Condition which Redux Devtools will be enabled. |
Gotchas: To set a config to false
, leave it empty.
# wrong
REDUX_DEVTOOLS=false
# correct
REDUX_DEVTOOLS=
You can use the starter-kit
alias to import
files. To change this, check the make-app-symlink
script in package.json
. This is useful for directories that are two levels away (../../module/some-file
=> starter-kit/common/module/some-file
).