Giter Site home page Giter Site logo

codylindley / react-app-dawn Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 2.0 289 KB

A React app boilerplate with the minimal parts (Babel, Webpack 2, Linters etc...) with a priority of simplicity, configurability, and maintainablity.

CSS 0.47% JavaScript 98.60% HTML 0.93%

react-app-dawn's Introduction

react-app-dawn

It is likley the case that using one of the boilerplates list below is more than adequite for the average developer working on an average React app.

This isn't a slight of the boilerplates or average developers. Both get the job done just fine in most situations.

However, a time will come when knowing the details of all aspects of a development stack will be required. When this happens you'll need something that is more boilerplate and less application seed. That is React App Dawn.

Installation:

1. Install Node (v7.0.0) & npm (Use NVM to run v7.0.0 or install latest Node/npm)

2. Install global npm packages. Run from a terminal:

$ npm i [email protected] [email protected] eslint stylelint browser-sync rimraf -g

3. Install local npm packages. Download this repo, cd into the repo directory from a terminal and run:

$ npm install

4. Start up a sever and server the hello world app. Run:

$ npm run start:dev

(This will open the app up in your default web browser at localhost:8080)

npm CLI scripts:

npm run [name:name] Description (read comments in package.json for more details)
npm run start:dev Start webpack dev server, serve src directory at localhost:8080 using hot reloading
npm run build Create a build version (bundle, lint, minify etc..) of src, place that in the build directory
npm run start:prod Start browser-sync, serve build directory at localhost:3000
npm run lint:js lint all js files in src directory
npm run lint:css lint all css file sin src directory

Broad description of tools used (including implementation deails):

Node Version Manager

  • Node Version Manager is used to manage which version of node is used for this app.
  • the .nvmrc defines the current version of node.

Webpack 2

  • Webpack 2 is used to take es2015 modules and translate them into a chunked format that can run in web browsers.
  • The configuration file for webpack is webpack.config.babel.js.
  • By using babel in the name of the file the file, webpack.config.babel.js, it will be babalized before running.

JS via Babel

Polyfill Browser DOM and JS features

Linting

  • Use eslint and stylelint linters, configured from files found in linters directory.

CSS

Conventions used:

  • Keep webpack config to a small single file that deals with both dev and production.
  • Own the JavaScript and CSS linter rules (starting point taken from eslint-config-airbnb and stylelint-config-standard)
  • Don't place unecessary configurations in package.json that can be contained in there own configuration file (e.g. .babelrc, .nvmrc, .eslintrc, .stylelintrc).
  • Linting happens during development in the developers editor and at build time.

react-app-dawn's People

Contributors

codylindley avatar

Stargazers

Tom Butler avatar pahosler avatar  avatar  avatar Lyndsey Browning avatar Andrea Dessi avatar  avatar pangpond avatar Vicent Gozalbes avatar Minwe LUO avatar  avatar Andreas Windt avatar Max Stockner avatar Jeff A. avatar Tim avatar Lucas avatar Kevin Old avatar Mundi Morgado avatar Brian Riley avatar

Watchers

 avatar  avatar

Forkers

ta2edchimp

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.