# 麒麟 CRM Design to Customer（以下简称 D2C）

## 简介

在一个常见的开发周期中往往遵循着产品需求到交互稿到设计稿再到前端开发的过程。所以在 Design to Customer (简称 D2C) 项目过程中，设计师负责来设计产品视觉效果和产出视觉设计稿，而前端开发工程师以设计稿为输入进行开发。所以在前端智能化的过程中，我们需要一种能自动解析设计稿信息的能力来替代传统的人工分析和抠图等繁琐的工作。D2C 就是为此而设计出来的，在企业级团队中就是通过 D2C 将设计稿中的视觉效果转换为开发团队的基础配置。从而统一整个产品的视觉效果，并使其项目更灵活可控。

## 安装

```bash
npm i @shuyun-ep-team/d2c
```

```bash
yarn add @shuyun-ep-team/d2c
```

## 参数

```
Usage: shuyun-d2c [options]

Options:
  -V, --version          output the version number
  -f, --file <file>      sketch 文件路径, 默认为：./design/ui.sketch (default: "./design/ui.sketch")
  -o, --output <dir>     输出路径, 默认为：./theme (default: "./themes")
  -t, --type <type>      编译类型，仅支持 ts,js,less,scss,json 中的一种或多种，多种请用英文字符 ","分割, 默认为: ts (default: "ts")
  -h, --help             output usage information
```

## 本地开发

克隆项目到本地：

```bash
$ git clone http://gitlab.shuyun.com/research-and-development-1/front-end-engineering/shuyun-ep-team/kylin-d2c.git
$ cd shuyun-ep-team/kylin-d2c
$ npm i
$ npm start
```

## 开发计划

[开发计划](./PLANS.md)
