# Fuc.js
  Fintech UI Components

## Documentation

### Clone repository from [github](https://github.com/joy-web/fuc.js)

```git
git clone git@github.com:joy-web/fuc.js.git
cd fuc.js
npm install
```

### Initialize the development environment

At first, You need to install Jekyll. The Fuc.js docs is based on the [Jekyll](https://jekyllrb.com/).

Note: Jekyll is running in the ruby environment. You should exec the following command to install Ruby and Jekyll.

1. Make sure you have installed the latest version ruby. And we use the rvm to manage ruby.

  ```
    rvm install 2.5.1 # or the latest version for ruby
    gem update
    # or
    sudo gem update
  ```

2.  Install jekyll and dependency package.

Note: Make sure to install dependencies in the current directory('fuc.js').

```
gem install jekyll bundler
bundle install
# or
bundle update
```

###  Start Jekyll server

```npm
npm start
```

Then, You can open the serve in browser

http://localhost:9080/

You can refer to more information to http://jekyllrb.com/

## Build

```
npm run build
```

## Build jekyll doc

利用 jci 打包发布，利用 sure 完成上线
```
npm run docs-build
```

说明：由于 fuc.js 放到 github 上，上线之前需要先在 jcode 上创建一个分支，操作步骤如下：
1. git clone http://jcode.cbpmgt.com/git/fuc_js.git 到本地，比如 `~/git-jcode-workspace/fuc_js`
2. 切换到 dev 分支 `git checkout dev` 或者 `git checkout -b dev remotes/origin/dev`
3. 修改 docs-build.js 中的变量 fucJcodePath 改为 1 中 git clone 的目录
4. 执行命令 `npm run docs-build`，执行完后，会自动创建一分支
5. 利用上面创建的分支在 jci 构建打包，在 sure 上完成上线

## Publish to npm

```npm
npm publish
```

## Other Development

### Rouge Theme

Generate a highlighter rouge theme

```npm
npm run rouge-theme
```

Note:
* The rouge themes has base16, base16.dark, base16.monokai, base16.monokai.light, base16.solarized, base16.solarized.dark,
  colorful, github, gruvbox, gruvbox.light, molokai, monokai, monokai.sublime, thankful_eyes, tulip
* After the rouge installed rouge (gem install rouge), you can use the command `rougify`
* Support highlighter language, you can view here http://rouge.jneen.net/
* the command `rougify -help style` can view all the support themes.
* You can search the theme from github https://github.com/search?q=pygments+style
* https://havee.me/internet/2016-02/upgrade-github-pages-site-to-jekyll-3.html

## 上传到 cdn 说明

* 开发测试阶段使用 fuc 命名，有 fuc.js  fuc.min.js fuc.css fuc.min.css 四个文件
* 发布某一版本时，命名规则为 fuc-version，比如 0.2.0 版本时，有 fuc-0.2.0.js  fuc-0.2.0.min.js fuc-0.2.0.css fuc-0.2.0.min.css 四个文件

## Issue

https://github.com/joy-web/fuc.js/issues

## CHANGELOG

Please view [here](./CHANGELOG.md)

## JS Plugins

* datatables
  * https://datatables.net/
* ztree
  http://www.treejs.cn/
* jquery-validate
  https://jqueryvalidation.org/
* velocity.js
  http://velocityjs.org/
* My97 DatePicker
  http://www.my97.net/
