naive-ui/README.md

74 lines
2.1 KiB
Markdown
Raw Normal View History

2019-06-17 19:52:16 +08:00
# naive-ui
TuSimple Vue-Based Frontend Component Library
2019-07-10 11:42:46 +08:00
## Documentation
[http://***REMOVED***/#/start](http://***REMOVED***/#/start)
## Repository
[https://***REMOVED***/naive-ui/tree/develop](https://***REMOVED***/naive-ui/tree/develop)
2019-07-10 11:42:46 +08:00
## Develop Guidelines
### Git Commit Message Style
2019-07-10 14:16:25 +08:00
You **MUST** follow [Angular Commit Format](https://gist.github.com/brianclements/841ea7bffdb01346392c).
2019-07-10 11:42:46 +08:00
If you want see some example, see [Angular Commits on Github](https://github.com/angular/angular/commits/master).
### Code Styles
#### Javascript Style
2019-07-10 14:16:25 +08:00
You **MUST** follow [Standard JS](https://standardjs.com/).
2019-07-10 11:42:46 +08:00
#### SCSS Style
2019-07-10 14:18:00 +08:00
Run `npm run lint-style` to check styles.
2019-07-10 11:42:46 +08:00
#### Check Both
Run `npm run lint`
You **MUST** fix all lint warnings and errors before you push your branch.
### Unit test
If you create a component, you **MUST** add unit test for it.
Run `npm run test` to test all components.
Run `npm run test-cov` to test all components and see detailed test coverage report.
## Want to see how component works
1. Run `npm run build`
2. Open `http://localhost:8086/` in browser.
2019-07-10 11:42:46 +08:00
## Want to add your own component
Explore by your self or ask `lecong.zhang@tusimple.ai`
## Publish a new version
1. You **MUST** change your version according to [semver](https://semver.org/)
2. `npm run release`
2019-07-10 11:42:46 +08:00
3. You **MAY** publish documentation by running `npm run release-doc`
## Installation & Usage
First install it.
```
npm install --save-dev naive-ui
```
Then add the following lines in you entry point js file.
2019-06-17 20:10:35 +08:00
```
...
2019-07-10 11:00:50 +08:00
import naiveUi from 'naive-ui'
import 'naive-ui/dist/lib/index.css
Vue.use(naiveUi)
2019-06-17 20:10:35 +08:00
...
```
2019-07-10 11:42:46 +08:00
## Component Develop Status
2019-07-10 11:00:50 +08:00
|Component|Unit Test|
|--|:--:|
|Alert|❌|
|Button|🆗|
|Checkbox|🆗|
|DatePicker|❌|
|GradientText|🆗|
|Icon|🆗|
|Input|🆗|
|Message|❌|
|Modal|❌|
|Notification|❌|
|Pagination|❌|
|Popup|❌|
|Select|🆗|
|Switch|❌|
|Tooltip|❌|
2019-07-10 11:00:50 +08:00
2019-07-10 11:42:46 +08:00
## Todo
1. Z-index management on `Select` & `Tooltip` & `Modal`(Low Priority)
2. Full featured table component(Medium Priority)
3. Form component(Medium Priority)
4. Complete unit test for all existing components(High Priority)