Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
examples
source
.babelrc
.eslintrc
.gitignore
.jsbeautifyrc
README.rst
package.json

README.rst

README

This provides a simple boilerplate app to start a React JS Project using webpack as the build tool. It enables the features available in Babel to use the ES2015 features, and includes unit testing with Mocha and Expect JS, and will hot reload the app when a file is saved. It also includes a basic setup for Bacon JS and Immutable JS.

Usage

  1. Open a terminal emulator and clone the git repository:

    git clone git@github.com:chrisberragan/react-boilerplate.git
    
  2. Install the Javascript dependencies:

    npm install
    
  3. Developing - run the following command to start developing the app, then open a browser at localhost:3000 to view it:

    npm start
    
  4. Building - run the following command to build the app for use in production:

    npm run build
    
  5. Testing - run one of the following commands from a terminal emulator to run the tests:

    # Run the Karma tests once with Phantom JS
    npm test
    
    # Run the Karma tests once with Phantom JS and watch for changes (ctrl-c to quit)
    npm run test:watch
    
    # Run the Karma tests with all browsers specified in the config/karma.conf file
    npm run test:all
    
    # Run a shell command to test a single test file with Mocha
    ./config/test-file.sh -- path/to/file
    
    # Run an npm command to test a single test file with Mocha
    (must be passed an absolute filepath to the file to run the tests)
    This is useful in Windows where shell scripts can't run by default
    npm run test-file -- absolute/path/to/file
    

Project Structure

├── .babelrc

├── .eslintrc

├── mocha.opts

├── build
The compiled code that is served to the production app, split into "vendor.js" for bundled libraries that won't change frequently, and "app.js" for modules that will change often.
├── config
Configuration for the Webpack build tool
├── examples
Demo instance of the app to use in development and functional testing
├── node_modules
The Javascript module dependencies for both development and the app itself
├── package.json
The NPM module configuration
└── source
The source code, written in ES2015 (also known as ES6) Javascript, that is compiled into the build directory as two ES5 Javascipt files
You can’t perform that action at this time.