Skip to content

RobertoPrevato/React-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-template

This project template is an application skeleton for React web applications using ES6 transpilation and Gulp task runner. It contains a sample application and is preconfigured to offer integration with Gulp, for common tasks.

The project template offers an example of client side technology stack, featuring:

  • Integration with Gulp task runner
  • Transpilation of code from ES6 to ES5
  • Gulp watch task, to monitor files for changes and automatically bundle the code during development
  • Fast JavaScript bundling, using watchify together with browserify
  • Strategy to organize the source code (both JavaScript and LESS), into logical areas
  • Client side routing, using react-router
  • Client side localization strategy
  • Integration with Bootstrap
  • Strategy to display preloaders and error panels
  • Example of React components definition, using ES6 class
  • Compilation of LESS code into CSS
  • Application wide, declarative and asynchronous forms validation strategy, using Dataentry

Live demo

A live demo of the React-template application is available here.

Getting started

To start using the React-template, either download the source code or use git clone to clone the repository.


Required software

NodeJs

The React‑template utilizes NodeJs and its npm (Node package manager), which is included in installers available for most common operating systems. The npm is required to download the dependencies of the project template. This documentation assumes that the option to add the npm command to the PATH system variable is left active during the installation.

Gulp cli

The React‑template utilizes the Gulp task runner. If not already installed, it is recommended to install the Gulp Command Line Interface (Gulp cli) globally, running from a command line the command: npm install --global gulp-cli

Restoring dependencies

Once the source code has been downloaded locally, it is necessary to restore the dependencies for the NodeJs tasks, which is achieved by running the npm install command in the root folder of the project template, where the packages.json file resides. npm install

Running the public-build task

Once the npm install command completes, verify that the environment works properly by issuing this terminal command: gulp public-build Which should produce an output like the one of the picture below: public-build


Visiting the demo application

The code of the React-template demo application does not require a running web server in order to be used. It is possible to open and test the demo application by opening the index.html inside the httpdocs directly in a browser, like shown in the below picture. Visiting without server

In any case, it is recommended to work with a web server, to use a more realistic development environment. Visiting using web server

The author's recommended way to quickly use a development web server, is to use the Python HttpServer module (requires Python 3 installed):

  • py -3 -m http.server 44660 (under Windows)
  • python3 -m http.server 44660 (under Linux)

Or, using Python 2.x:

  • py -2 -m SimpleHTTPServer 44660 (under Windows)
  • python -m SimpleHTTPServer 44660 (under Linux)

Documentation

Detailed documentation is available at the wiki page.

About

Project template for React web applications using ES6 transpilation and Gulp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors