Skip to content

Commit 0bd1208

Browse files
author
Sven
committed
release v2.0.0
1 parent 18dabb5 commit 0bd1208

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3195
-1813
lines changed

.babelrc

Lines changed: 0 additions & 33 deletions
This file was deleted.

.editorconfig

Lines changed: 0 additions & 30 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 38 deletions
This file was deleted.

.gitignore

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1-
.DS_STORE
2-
*.log
3-
node_modules
4-
dist
5-
coverage
6-
.idea/
7-
.yarn-cache
8-
.vscode/
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
22+
23+
# css
24+
src/**/*.css
25+
26+
# chrome
27+
chrome

.travis.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
sudo: false
21
language: node_js
32
node_js:
4-
- "6"
5-
3+
- 6
64
cache:
75
yarn: true
86
directories:
97
- node_modules
10-
before_install:
11-
# CI server install taobao npm packages too slow.
12-
- rm -rf ./yarn.lock
13-
148
script:
15-
- yarn lint
9+
- yarn add --force node-sass
1610
- yarn build
11+
- yarn coverage
12+
after_script:
13+
- yarn codecov
14+
deploy:
15+
provider: pages
16+
skip_cleanup: true
17+
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
18+
local_dir: build
19+
on:
20+
branch: master

README-zh.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# vortex-react
22

33
[![Build Status](https://travis-ci.org/YutHelloWorld/vortex-react.svg?branch=master)](https://travis-ci.org/YutHelloWorld/vortex-react)
4-
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
5-
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/YutHelloWorld/vortex-react/blob/master/LICENSE)
4+
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
5+
[![codecov](https://codecov.io/gh/YutHelloWorld/vortex-react/branch/master/graph/badge.svg)](https://codecov.io/gh/YutHelloWorld/vortex-react)
6+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
67

78
基于[React](https://facebook.github.io/react/)/[Redux](http://redux.js.org/)/[React-Router v4](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom)/[Webpack v3](https://webpack.js.org/)/[Reactstrap](https://reactstrap.github.io/)的前端脚手架。
89

README.md

Lines changed: 33 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# vortex-react
22

33
[![Build Status](https://travis-ci.org/YutHelloWorld/vortex-react.svg?branch=master)](https://travis-ci.org/YutHelloWorld/vortex-react)
4-
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
5-
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/YutHelloWorld/vortex-react/blob/master/LICENSE)
4+
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
5+
[![codecov](https://codecov.io/gh/YutHelloWorld/vortex-react/branch/master/graph/badge.svg)](https://codecov.io/gh/YutHelloWorld/vortex-react)
6+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
67

7-
Get start with [React](https://facebook.github.io/react/), [Redux](http://redux.js.org/), [RR4](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom), [Webpack3](https://webpack.js.org/) 🚀
8+
Get start with [React](https://facebook.github.io/react/), [Redux](http://redux.js.org/), [RR4](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-dom) 🚀
9+
10+
> Release 2.0.0 was build with create-react-app
811
912
👉 [Online](https://yuthelloworld.github.io/vortex-react)
1013

@@ -19,12 +22,9 @@ Get start with [React](https://facebook.github.io/react/), [Redux](http://redux.
1922
+ [Running](#running)
2023
+ [Scripts](#scripts)
2124
* [Project Structure](#project-structure)
22-
+ [File Tree](#file-tree)
25+
+ [Files Structure](#files-structure)
2326
+ [Data Flow](#data-flow)
2427
+ [Logic](#logic)
25-
* [Live Development](#live-development)
26-
* [Deploy](#deploy)
27-
* [Code Style](#code-style)
2828
* [Contribution](#contribution)
2929

3030
</details>
@@ -34,14 +34,11 @@ Get start with [React](https://facebook.github.io/react/), [Redux](http://redux.
3434
## Feature
3535

3636
- React
37-
- ES6 + Babel
38-
- Webpack3
37+
- ES6
3938
- Redux
4039
- React-Router-Dom
4140
- Reactstrap + Bootstrap\^4.0.0-alpha.6 (UI)
4241
- Sass
43-
- Eslint
44-
- Express
4542

4643
---
4744

@@ -77,46 +74,41 @@ yarn start # Start the development server (or `npm start`)
7774
| `yarn <script>` | Description |
7875
| --------------- | -------------------------------------------------- |
7976
| `start` | Serves your app at <http://localhost:3000> |
80-
| `build` | Builds the application to ./dist |
81-
| `lint` | Lints the project for potential errors |
82-
| `lint:fix` | Lints the project and fixes all correctable errors |
77+
| `build` | Builds the application to ./build |
78+
| `test` | Runs unit tests |
79+
| `coverage` | Gets coverage |
80+
| `analyze` | analyze the bundle size |
8381

8482
---
8583

8684
## Project Structure
8785

88-
### File Tree
86+
### Files Structure
8987

9088
```bash
9189
.
9290
├── build                   # All build-related code
9391
├── public                   # Static public assets (not imported anywhere in source code)
94-
├── server                   # Express application that provides webpack middleware
95-
│   └── main.js             # Server application entry point
96-
├── src                     # Application source code
97-
│   ├── index.html           # Main HTML page container for app
98-
│   ├── main.js             # Application rendering
99-
│   ├── normalize.js         # Browser normalization and polyfills
100-
│   ├── components           # Global Reusable Components
101-
│   ├── layouts             # Components that dictate major page structure
102-
│   │   └── PageLayout       # Components that dictate major page structure
103-
│   ├── routes               # Components that dictate major page structure
104-
│   │   ├── index.js         # Main application routes with store
105-
│   │   ├── Home             # Fractal route
106-
│   │   │   ├── index.js     # Route definitions and async split points
107-
│   │   │   ├── assets       # Assets required to render components
108-
│   │   │   ├── components   # Presentational React Components
109-
│   │   │   └── routes **
110-
│   │   └── Counter
111-
│   │       ├── index.js
112-
│   │       ├── container   # Container component
113-
│   │       ├── modules     # redux module(reducers/constants/actions)
114-
│   │       └── routes **
115-
│   ├── store               # Redux store
116-
│   │   ├── createStore.js   # Create store
117-
│   │   └── reducers.js     # Reducers
118-
│   └── styles               # Style sheet
119-
└── tests                   # Unit tests
92+
└── src                     # Application source code
93+
  ├── index.js             # Application rendering
94+
  ├── components           # Global Reusable Components
95+
  ├── layouts             # Components that dictate major page structure
96+
  ├── routes               # Components that dictate major page structure
97+
  │   ├── index.js         # Main application routes with store
98+
  │   ├── Home             # Fractal route
99+
  │   │   ├── index.js     # Route definitions and async split points
100+
  │   │   ├── assets       # Assets required to render components
101+
  │   │   ├── components   # Dumb Components
102+
  │   │   └── routes **
103+
  │   └── Zen
104+
  │       ├── index.js
105+
  │       ├── container   # Smart component
106+
  │       ├── modules     # redux module(reducers/constants/actions)
107+
  │       └── routes **
108+
  ├── store               # Redux store
109+
  │   ├── createStore.js   # Create store
110+
  │   └── reducers.js     # Reducers
111+
  └── styles               # Style sheet
120112
```
121113

122114
### Data Flow
@@ -129,59 +121,6 @@ yarn start # Start the development server (or `npm start`)
129121

130122
---
131123

132-
## Live Development
133-
134-
We use `webpack-dev-middleware` and `webpack-hot-middleware` for server and HMR 。
135-
136-
We recommend using [Redux DevTools Chrome Extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd).
137-
138-
---
139-
140-
## Deploy
141-
142-
>Use `nginx` to proxy static web to start this app。Point at `~/dist/index.html`.[See more](https://github.com/ReactTraining/react-router/blob/v3/docs/guides/Histories.md#configuring-your-server)
143-
144-
This is an exmaple in ubuntu:
145-
146-
- Install nginx:
147-
148-
```bash
149-
sudo apt-get install nginx
150-
```
151-
152-
- Configure:
153-
154-
```bash
155-
sudo vi /etc/nginx/sites-available/default
156-
```
157-
158-
- Copy the flowing to configure:
159-
160-
```bash
161-
server{
162-
listen 8001;
163-
server_name 127.0.0.1; //server Ip
164-
location / {
165-
proxy_pass http://127.0.0.1:3000;
166-
}
167-
}
168-
```
169-
170-
- restart nginx,start app,browser <http://localhost:8081>
171-
172-
```bash
173-
sudo service nginx restart
174-
175-
// cd your root file
176-
yarn start
177-
```
178-
179-
---
180-
181-
## Code Style
182-
183-
Refrence [airbnb/javascript](https://github.com/airbnb/javascript)[Javascript Standard Style](https://standardjs.com/rules-zhcn.html#javascript-standard-style) and [standard-react](https://github.com/standard/eslint-config-standard-react),we set up [.eslintrc](https://github.com/YutHelloWorld/vortex-react/blob/master/.eslintrc)
184-
185124
## Contribution
186125

187126
Thank you to all the people who already contributed to vortex-react!

build/lib/logger.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)