[![Pipeline Status](https://gitlab.eoitek.net/EOI/newlook/badges/master/pipeline.svg)](https://gitlab.eoitek.net/EOI/newlook/pipelines)

# 夏洛克前端项目

* 这是夏洛克（Sharplook）重构之后的新项目仓库

## 基础构架

### 使用 angular.js 构建

* 这里有世界上最权威的 angular.js 文档：[https://docs.angularjs.org/guide](https://docs.angularjs.org/guide)

### 使用 bootstrap 样式库搭建前端 UI

* 使用 bootstrap V3 搭建基础前端 UI：[http://getbootstrap.com/](http://getbootstrap.com/)
* 你还需要了解 ui-bootstrap：[http://angular-ui.github.io/bootstrap/](http://angular-ui.github.io/bootstrap/)

### 路由使用 ui-router

* ui-router For ng1：[https://ui-router.github.io/ng1/docs/latest/index.html](https://ui-router.github.io/ng1/docs/latest/index.html)

### 文件使用 webpack 2+ 打包

* webpack 2+：<https://webpack.js.org/>

## 开始工作

* 首先 Fork 这个项目
* 把代码拉取下来：`git clone git@gitlab.eoitek.net:你的名称/newlook.git`
* 添加 EOI 远端：`git remote add upstream git@gitlab.eoitek.net:EOI/newlook.git`
* 安装依赖：`npm install`，确保 `npm --version` 为 `4.6.1`
* 启动项目：make
* 如果你使用 linux，发现自动 watch 不生效，请看这里： <https://webpack.github.io/docs/troubleshooting.html#not-enough-watchers>

## 建议使用的编辑器

* [VS Code](http://code.visualstudio.com/Download)，请安装 ESLint 插件
* [Sublime](http://www.sublimetext.com/)，请安装 SublimeLinter 和 SublimeLinter-contrib-eslint 插件
* [WebStorm](www.jetbrains.com/webstorm)
* 以上所有工具都建议打开 `自动清除行尾空格` 和 `自动添加新行` 配置

## 交付测试

* 提交代码后，项目会自动发布到 <https://newlook.eoitek.net>
* 如果提示 DNS 解析错误，请绑定 host: 192.168.31.102

## 本项目在 GitHub 上的镜像地址

* <https://github.com/EOITek/newlook>
* 每 5 分钟更新一次

```crontab
# crontab -e
*/5  *  *  *  *  cd /var/opt/gitlab/git-data/repositories/EOI/newlook.git && git push github &>> /root/github.log
```

## 有问题请找

* 李通洲 [156-1894-7918](tel:156-1894-7918)
