/tests

Primary LanguageJavaScriptMIT LicenseMIT

Skeleton for React based application

Build Status Dependency Status devDependency Status

Kick-start your new web application based on React and Redux technologies. It also includes Webpack 2, Yarn, React hot loader, PostCSS, JSON-server tools and test environment based on Jest, Enzyme, Eslint and Stylelint for even more rapid development.

Dependencies:

List of all dependencies is presented here

Install

OSX

Install Node.js

Via brew:

brew install node yarn

Via nvm:

brew install nvm yarn
nvm install node
nvm alias default node

Quick start

Clone application as new project with original repository named "react-base"

git clone git@github.com:fs/react-base.git --origin react-base [MY-NEW-PROJECT]

Create your new repo on GitHub and push master into it. Make sure master branch is tracking origin repo.

git remote add origin git@github.com:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
git push -u origin master

Run bootstrap script

bin/setup

Run application

Run app (by default environment is 'development', port is 8000)

yarn start

Run app with options

[<options>] yarn start
NODE_ENV=development # build app with development environment
NODE_ENV=production # build app with production environment
NODE_ENV=test # build app with test environment
PORT=8000 # run server on 8000 port

Start to use application in browser:

localhost:8000

Run tests and linters

yarn test

Code linting tasks

Run javascript linter

yarn run eslint

Run stylesheets linter

yarn run stylelint

Run all linters

yarn run lint

Test tasks

Run jest tests

yarn run jest

Credits

React base is maintained by Marat Fakhreev. It was written by Flatstack with the help of our contributors.