Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ymfe/ykit-config-antd
ykit ant-design 配置插件
https://github.com/ymfe/ykit-config-antd
ykit ykit-plugin
Last synced: 9 days ago
JSON representation
ykit ant-design 配置插件
- Host: GitHub
- URL: https://github.com/ymfe/ykit-config-antd
- Owner: YMFE
- License: mit
- Created: 2017-05-03T07:26:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-16T09:46:15.000Z (almost 7 years ago)
- Last Synced: 2024-10-10T23:34:48.049Z (about 1 month ago)
- Topics: ykit, ykit-plugin
- Language: JavaScript
- Size: 27.3 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ykit-config-antd
该插件已内置 ykit-config-react & ykit-config-es6,不需要单独引入。## Features
- 编译 ES6+, JSX 代码
- 通过 happypack 提升编译速度
- 内置 ant-design & react## Usage
如果是新项目,在一个空的目录下执行:
```shell
$ ykit init antd
```会在当前目录下生成一个初始工程。
如果是已有项目,在项目中执行:
```shell
$ npm install ykit-config-antd --save
```编辑 `ykit.js`,引入插件即可:
```javascript
module.exports = {
plugins: ['antd']
// ...
};
```## 使用
使用组件需要先手动引入 ant-design 样式。在工程中的 style.css(style.scss/style.less) 中添加:
```css
@import '~antd/dist/antd.css';
```使用组件:
```javascript
import { DatePicker } from 'antd';
ReactDOM.render(, mountNode);
```## 示例
查看:https://github.com/roscoe054/ykit-starter-antd