lightshire / react-redux-starter-kit-1

An opinionated react+redux starter kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-redux-starter-kit

An opinionated react+redux starter kit.

Libraries

Mainly:

Development:

FAQ

Getting Started

Some requirements include:

Afterwards, clone, and then run the following to install the dependencies:

npm install
bundle install

Development

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

Configuration

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=

Alias

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).

About

An opinionated react+redux starter kit


Languages

Language:JavaScript 96.1%Language:HTML 3.0%Language:Ruby 0.7%Language:CSS 0.2%