Code Monkey home page Code Monkey logo

react-groundwork's Introduction

react-groundwork

A starting point for react applications. The goal of this project is to provide a very fast and simple basic structure to create single page react apps with unit testing already setup. It is slightly opinionated (sass, karma, mocha, chai), but makes no opinions about flux/mv* architecture or package management (npm/yarn).

Getting Started

To get started, simply fork this project.

Installing

Install with npm or yarn. All examples will be using yarn.

yarn install

The Project

Config file

The project config is located at src/config.js.

module.exports = {
  // Whether to use node in production (as opposed to having something like nginx serve your files).
  // If this is false, npm start will spit out an index.html file in /dist
  useServerInProd: true,
  port: 3030,
  publicPath: '/dist/',
  basePath: '/' // e.g. the "/myapp" in www.mywebsite.com/myapp
};

Working on the project

To start the project in development mode:

yarn run dev

This will rebuild the static files on changes and restart the server on server changes.

Building for prod

yarn start

This will bundle assets with minification, and depending on config.useServerInProd, will either start a node server or spit out /dist/index.html.

Running the tests

Unit tests are setup with mocha and mocha-webpack, with the assumption that each test ends in .test.js.

yarn test

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.