Code Monkey home page Code Monkey logo

react-redux-webpack-starter's Introduction

React-babel-webpack-es6 Starter Project

A boilerplate using React, webpack and hot module reloading, and ES6 + JSX via Babel.You could use it as a base to build your own web app.

Features

The provided boilerplate enables client-side ES6 via the following technologies:

  • webpack and webpack-dev-server as a client-side module builder and module loader.
  • npm as a package manager and task runner
  • Babel 6 as a transpiler from ES6 to ES5.
  • React and JSX as a virtual Dom JavaScript library for rendering user interfaces (views).
  • ESLint as a reporter for syntax and style issues. eslint-plugin-react for additional React specific linting rules.
  • Sass as a compiler of CSS styles with variables, mixins, and more.
  • Inline base64 URLs for images and fonts if their size is less than specified limit of file-loader
  • Image compression processing of image-webpack-loader
  • Watch index.html for changes of html-webpack-plugin

Getting Started

Installation

you should clone the repo and install the dependencies.

$ git clone https://github.com/chenbin92/react-redux-webpack-starter.git app-name
$ cd app-name
$ npm install  //or cnpm install

Development

In the development mode. launch the boilerplate app:

// run the dev server http://localhost:8080

$ npm start  

you should see a new browser tap opening and a title of "Hello React” in http://localhost:8080/, page hot reloads automatically when there are changes

Webpack-dashboard homepage

When you run npm start:

  • The sass-loader compiles Sass into CSS
  • Webpack bundles the compiled CSS、JS into bundle.js

Production

In the production mode, you can:

// run the prod server http://localhost:9090

$ npm run start: prod
// build the static files.

$ npm run build 

npm run build. This will prepare and build the project for production use. It does the following:

  • Minifies all JS and CSS
  • Inline base64 URLs for images and fonts if their size is less than specified limit
  • Sets NODE_ENV to production so that React is built in production mode
  • Places the resulting built project files into /build directory

All configuration tasks

  • npm start: start the development model of server
  • npm run start:prod: start the production model of server
  • npm run build: compile code in production mode
  • npm run lint: lint with ESlint and Airbnb's style sheet.
  • npm run lint:watch: eslint watching
  • npm run remove:build: remove the dist directory
  • npm run clean:build : clean the dist directory

TODO

  • add test

Others

react-redux-webpack-starter's People

Contributors

chenbin92 avatar

Watchers

 avatar

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.