• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

wbkd/react-starterkit: Yet another react starterkit. Including react-router, ref ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

wbkd/react-starterkit

开源软件地址(OpenSource Url):

https://github.com/wbkd/react-starterkit

开源编程语言(OpenSource Language):

JavaScript 88.1%

开源软件介绍(OpenSource Introduction):

React Starterkit

This repository is unmaintained. Please check out our new React Starter

This react starterkit provides a prepared development environment based on gulp, stylus and webpack. The internal data flow is handled with Reflux and the routing is managed with the React-Router.

Demo

This starterkit 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/wbkd/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

Reflux

We are using Reflux, which is an implemantion of the Flux Architecture. If you want to read more about Reflux, check out the readme of the reflux git repo.

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/stylus/main.styl

Stylus

As you can see we are using stylus to preprocess our .styl files. If you didn't work with a css preprocessor before the stylus page is a good starting point to get to know what stylus 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.styl 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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap