Skip to content

Commit

Permalink
update:docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kvkens committed Sep 26, 2016
1 parent 8cba10b commit 0557d1d
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 24 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Chinese](https://github.com/iuap-design/uba/blob/master/README_CN.md)
[中文版本](https://github.com/iuap-design/uba/blob/master/README_CN.md)
# uba

[![npm version](https://img.shields.io/npm/v/uba.svg)](https://www.npmjs.com/package/uba)
Expand All @@ -20,18 +20,22 @@ $ npm install uba -g
- `$ uba init uba-project`
- `uba` will create the project.

2、create a web page template
- `uba page web01`
- look the `src/containers/`

2、 Enter the project to create the project run server.
- `$ uba server -p 9000`
- `$ uba server -p 5000`

> If you want to modify the port `-p 5000`
> If you want to modify the port `-p 5000` default:port 3000
- Now open the local service `http://localhost:9000`.
- Now open the local service `http://localhost:5000`.

3、 After the development is completed to build an optimized version.
- `$ uba build`
- Build projects in our current directory.

4、 publising `.war`.
4、 publising `.war` to maven.
- `$ uba publish`
- `uba` will be generated in the current folder publish.
- Open your `publish`folder to see if there is a.
Expand Down Expand Up @@ -79,7 +83,7 @@ $ uba server
$ uba build
```

##### Publishing
##### Publishing Maven
```sh
$ uba publish
```
26 changes: 16 additions & 10 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[English](https://github.com/iuap-design/uba/blob/master/README_CN.md)
# uba

[![npm version](https://img.shields.io/npm/v/uba.svg)](https://www.npmjs.com/package/uba)
Expand All @@ -20,21 +21,26 @@ $ npm install uba -g
- `$ uba init uba-project`
- uba会在我们当前运行的目录下创建一个`uba-project`文件夹.

2、 进入我们创建的工程文件夹,来运行调试并自动开启服务
- `$ uba server -p 9000`
2、使用`uba page web01`来创建基本的页面结构组织.

> 这样就会在`src/containers/`下面看到输出的文件夹.
3、 进入我们创建的工程文件夹,来运行调试并自动开启服务
如果想不使用默认端口3000的话,可以参数`-p`指定自定义的端口.
- `$ uba server -p 5000`

> 这里配置了具体端口使用 `-p`
- 这时候uba开启了本地`http://localhost:9000`的服务.
- 这时候uba开启了本地`http://localhost:5000`的服务.

3、 开发调试完成后,我们可以构建出最优化的工程.
- `$ npm build`
4、 开发调试完成后,我们可以构建出最优化的工程.
- `$ uba build`
- 这样在当前文件夹下会生成`build`的文件夹,里面有我们需要的优化过的资源项目.

4、 需要产出`.war`资源发布文件,需要做一个简单的操作.
- `$ npm publish`
- `uba` 会把我们当前构建出的静态资源进行一个打包操作
- 打开你的`publish`文件夹看看,是不是有一个`publish.war`在那里?
5、 需要产出`.war`资源发布文件,需要做一个简单的操作.
- `$ uba publish`
- `uba` 会把我们当前构建出的静态资源进行一个打包操作并且会执行mvn命令发布到指定配置的Maven.
- 打开你的`publish`文件夹看看,是不是有一个`dist.war`在那里?

## API

Expand Down Expand Up @@ -79,7 +85,7 @@ $ uba server
$ uba build
```

##### 发布
##### 发布Maven
```sh
$ uba publish
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uba-init",
"version": "0.0.32",
"version": "0.0.33",
"description": "uba resourse",
"main": "./bin/uba-init.js",
"bin": {
Expand Down
16 changes: 10 additions & 6 deletions uba-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Chinese](https://github.com/iuap-design/uba/blob/master/README_CN.md)
[中文版本](https://github.com/iuap-design/uba/blob/master/README_CN.md)
# uba

[![npm version](https://img.shields.io/npm/v/uba.svg)](https://www.npmjs.com/package/uba)
Expand All @@ -20,18 +20,22 @@ $ npm install uba -g
- `$ uba init uba-project`
- `uba` will create the project.

2、create a web page template
- `uba page web01`
- look the `src/containers/`

2、 Enter the project to create the project run server.
- `$ uba server -p 9000`
- `$ uba server -p 5000`

> If you want to modify the port `-p 5000`
> If you want to modify the port `-p 5000` default:port 3000
- Now open the local service `http://localhost:9000`.
- Now open the local service `http://localhost:5000`.

3、 After the development is completed to build an optimized version.
- `$ uba build`
- Build projects in our current directory.

4、 publising `.war`.
4、 publising `.war` to maven.
- `$ uba publish`
- `uba` will be generated in the current folder publish.
- Open your `publish`folder to see if there is a.
Expand Down Expand Up @@ -79,7 +83,7 @@ $ uba server
$ uba build
```

##### Publishing
##### Publishing Maven
```sh
$ uba publish
```
91 changes: 91 additions & 0 deletions uba-cli/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[English](https://github.com/iuap-design/uba/blob/master/README_CN.md)
# uba

[![npm version](https://img.shields.io/npm/v/uba.svg)](https://www.npmjs.com/package/uba)
[![Build Status](https://img.shields.io/travis/iuap-design/uba/master.svg)](https://travis-ci.org/iuap-design/uba)
[![devDependency Status](https://img.shields.io/david/dev/iuap-design/uba.svg)](https://david-dm.org/iuap-design/uba#info=devDependencies)



`uba` 是一个集项目初始化、本地服务、数据模拟、资源编译、发布部署于一体的前端集成开发工具。为您提供多种项目最佳实践,使用五条命令即可打通开发全过程。轻量小巧,上手简单


## 如何安装
uba是需要安装到全局npm环境使用.
```sh
$ npm install uba -g
```

## 如何使用
1、首先初始化一个最佳实践工程
- `$ uba init uba-project`
- uba会在我们当前运行的目录下创建一个`uba-project`文件夹.

2、使用`uba page web01`来创建基本的页面结构组织.

> 这样就会在`src/containers/`下面看到输出的文件夹.
3、 进入我们创建的工程文件夹,来运行调试并自动开启服务
如果想不使用默认端口3000的话,可以参数`-p`指定自定义的端口.
- `$ uba server -p 5000`

> 这里配置了具体端口使用 `-p`
- 这时候uba开启了本地`http://localhost:5000`的服务.

4、 开发调试完成后,我们可以构建出最优化的工程.
- `$ uba build`
- 这样在当前文件夹下会生成`build`的文件夹,里面有我们需要的优化过的资源项目.

5、 需要产出`.war`资源发布文件,需要做一个简单的操作.
- `$ uba publish`
- `uba` 会把我们当前构建出的静态资源进行一个打包操作并且会执行mvn命令发布到指定配置的Maven.
- 打开你的`publish`文件夹看看,是不是有一个`dist.war`在那里?

## API

---
##### 查看帮助

```sh
$ uba --help or -h
```

```sh
1. uba init <project name> 初始化创建web工程
2. uba page <myPage> 添加页面
3. uba server -p 3000 运行当前web工程并调试
4. uba build 产出全部静态资源
5. uba publish 发布war包到maven
6. uba --version 显示当前uba工具版本
7. uba --help 查看帮助
```
##### 查看当前版本
```sh
$ uba --help or -h
```

##### 初始化最佳实践web工程
```sh
$ uba init demo
```

##### 添加页面
```sh
$ uba page myPage
```

##### 运行一个调试服务
```sh
$ uba server
```

##### 产出静态资源
```sh
$ uba build
```

##### 发布Maven
```sh
$ uba publish
```
2 changes: 1 addition & 1 deletion uba-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uba-cli",
"version": "1.0.29",
"version": "1.0.30",
"description": "uba tools global cli",
"main": "./uba.js",
"bin": {
Expand Down

0 comments on commit 0557d1d

Please sign in to comment.