Giter Site home page Giter Site logo

udivankin / react-starterkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wbkd/react-starterkit

0.0 2.0 1.0 393 KB

Yet another react starterkit. Including react-router, flux, jest, webpack, gulp and sass.

Home Page: http://udivankin.github.io/react-starterkit

License: MIT License

HTML 2.18% JavaScript 93.56% CSS 4.27%

react-starterkit's Introduction

React Starterkit

This react starter kit provides a prepared development environment based on gulp, SASS and webpack. Data flow is made using Flux dispatcher, the routing is managed with the React-Router.

####Demo This starter kit does not include some fancy UI stuff but is a lightweight starting point for your next react app.

Get the kit

$ git clone https://github.com/udivankin/react-starterkit.git && cd react-starterkit

Installation

Install all dependencies.

$ npm install

Development

Builds the application and starts a webserver with livereload. By default the webserver starts at port 1337. You can define a port with $ gulp --port 3333.

$ npm start

Build

Builds a minified version of the application in the dist folder.

$ gulp build --type production

Testing

We use jest to test our application.
You can run the tests that are defined under app/scripts/__tests__ with

$ npm test

Javascript

Javascript entry file: app/scripts/main.js

React-Router

The routing is done with the react-router. It's especially great for SPA's. We would recommend to read the guide to get an overview of the router features.

ES6 with babel

We are working with the webpack babel loader in order to load our .js/.jsx files. Babel allows you to use ES6 features like class, arrow functions and much more.

CSS

CSS entry file: app/sass/main.scss

SASS

As you can see we are using SASS to preprocess our .scss files. If you didn't work with a css preprocessor before the sass page is a good starting point to get to know what SASS can do for you.

If you want to use third-party CSS you just include it via @import 'path/to/your/third-party-styles.css' at the top of the main.scss file.

Webpack Hints

You can find the webpack configuration in the webpack.config.js file. We use the babel-loader in order to load .jsx and .js files via webpack. If it's possible install all your dependencies with NPM. Packages installed with NPM can be used like this:


var moduleXYZ = require('moduleXYZ');

You can find all loaders in this list.

###Requirements

  • node
  • npm
  • gulp

react-starterkit's People

Contributors

g-div avatar moklick avatar udivankin avatar

Watchers

 avatar  avatar

Forkers

6-post

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.