Skip to content

Template for creating React + Redux universal applications.

Notifications You must be signed in to change notification settings

asdelday/react-app-template

Repository files navigation

POS WEB REACT APP TEMPLATE

Template for creating React + Redux universal applications.

WIP: This boilerplate is still being developed

About

This is a starter boilerplate to create react applications which uses the following technologies:

  • Core:

  • JS Compilers:

    • Babel ES6 and ES7 Javascript compiler
  • CSS Compilers:

    • CSSNext Compiler to use the next css (CSS4) generation
  • Bundlers:

    • Webpack - Javascript module bundler
  • Linting:

  • Testing:

  • Other tools:

    • Better NPM Run - Cross Platform smart and easy way to handle environment variables
    • Webpack Dev Server - Server for development purposes
    • Styleguidist - Generates Component documentation easily
    • React Hot Loader - Enables the awesome React Hot Loader feature for a better development experience
    • Redux DevTools - DevTools for Redux with hot reloading, action replay, and customizable UI

How to use

Installation

Important: be care if the project has its own .npmrc. If the project has an own registry configure it properly.

npm install

Running Dev Server

Runs a server for development purposes [ONLY]

npm run dev

or in separated processes

npm run start-dev
npm run watch-client

Running Production Server

Important: Before start the production server you have to build the bundles

npm run start-prod

or

npm start

Building

To create the bundles for the component run

npm run build

Anyway the prepublish trigger will do it for you before you publish the package

Testing

To singleRun the tests (this command also fires after the tests the linting thanks to posttest trigger):

npm test

To a TDD or watch run mode:

npm run test:watch

Anyway the preversion trigger will do it for you before change the package version

Linting

To check the Javascript linting run:

npm run lint

Anyway the posttest trigger will do it for you after all the tests are passed

Upgrading version

Major

npm run version-major

Minor

npm run version-minor

Patch

npm run version-patch

Documentation

Run Documentation server

npm run styleguide-server

Build Documentation

npm run styleguide-build

Using Redux DevTools

Redux Devtools are enabled by default in development.

If you have the Redux DevTools chrome extension installed it will automatically be used on the client-side instead.

If you want to disable the dev tools during development, set __DEVTOOLS__ to false in /webpack/dev.config.js.
DevTools are not enabled during production.

TODO:

  • Update to react-router v4
  • Update to Webpack 2
  • Enable Tree Shaking
  • Remove webpack-isomorphic-tools for SSR
  • Implements PWA
  • Improve Documentation
  • Clean unnecessary dependencies
  • Improve testing
  • Centralize config
  • Change public env variables to use a .env file instead better-npm-run

About

Template for creating React + Redux universal applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published