diff --git a/README.md b/README.md index 146094052..1f7abe7cd 100644 --- a/README.md +++ b/README.md @@ -1,156 +1,9 @@ -# naive-ui -TuSimple Vue-Based Frontend Component Library +
+ +
+ +A style first Vue-based component library.
+ ## Documentation -[http://***REMOVED***/#/start](http://***REMOVED***/#/start) -## Repository -[https://***REMOVED***/naive-ui/tree/develop](https://***REMOVED***/naive-ui/tree/develop) -## Develop Guidelines -### Git Commit Message Style -You **MUST** follow [Angular Commit Format](https://gist.github.com/brianclements/841ea7bffdb01346392c). - -If you want see some example, see [Angular Commits on Github](https://github.com/angular/angular/commits/master). -### Code Styles -#### Javascript Style -You **MUST** follow [Standard JS](https://standardjs.com/). -#### SCSS Style -Run `npm run lint-style` to check styles. -#### 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 dev` -2. Open `http://localhost:8086/` in browser. - -## Want to add your own component -There is no guideline for now. If you want to know how to do it, you can explore by yourself 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` -3. You **MAY** publish documentation by running `npm run release-doc` - -## Installation & Usage -First install it. - -```bash -npm install --save-dev naive-ui -``` -Then add the following lines in you entry point js file. -```js -import naiveUi from 'naive-ui' -import 'naive-ui/dist/lib/index.css' - -Vue.use(naiveUi) -``` -## Component Develop Status -|Component|Develop status|Unit Test|Note| -|--|:--:|:--:|--| -|Alert|😍|❌|| -|Button|😍|🆗|| -|Checkbox|😍|🆗|| -|DatePicker|😍|❌|| -|TimePicker|😍|❌|| -|GradientText|😍|🆗|| -|Icon|😍|🆗|| -|Input|😍|🆗|| -|Message|😍|❌|Code clean in need| -|Modal|😍|❌|Code clean in need| -|Notification|😍|❌|Code clean in need| -|Pagination|😍|🆗|Unit test is not enough| -|Select|😍|🆗|Multiple search is not done| -|Switch|😍|❌|| -|Tooltip|😍|❌|| -|Popover|😍|❌|| -|InputNumber|😍|❌|| -|Radio|😍||| -|Tab|😍||| -|Badge|😍||| -|Steps|😍||| -|Tag|😍||| -|Divider|😍||| -|Popconfirm|😍||| -|BackTop|😍||| -|Progress|😍||Multiple Value| -|Timeline|😍||| -|Collapse|😍||| -|Cascader|😍||| -|Dropdown|😍||| -|Transfer|😍||| -|Spin|😍||| -|Drawer|🤔||| -|FormItem|🤔|❌|| -|Form|🤔|❌|| -|Table|🤔|❌|Function is not fulfilled| -|Slider|🤔||| -|LoadingBar|😍||| -|AutoComplete|🚧||| -|Tree|🤔||| -|TreeSelect|🚧||| -|Upload|🚧||| -|Time|🚧||| -|Anchor|🚧||| -|Statistic|🚧||| -|Breadcrumb|🚧||| -|Card|🚧||| -|Empty|🚧||| -|Grid|🚧||| -|Layout|🚧||| -|Affix|🚧||| -|Rating|🚧||| -|Avator|🚧||| -|Result|🚧||| -|Menu|✋||Not Planned| -|Typography|✋||Not Planned| -|Mentions|✋||Not Planned| -|Calendar|✋||Not Planned| -|Carousel|✋||Not Planned| - -1. Z-index management on `Select` & `Tooltip` & `Modal`(Low Priority) -2. Full featured table component(Medium Priority) -3. Form component(Medium Priority) -4. FormItem component(High Priority) -5. Complete unit test for all existing components(High Priority) -6. Create a Markdown webpack loader to convert documentation(Low Priority) -7. Refactor documentation page(for code clairity) -8. Code refactor for some 😢 messy code(which is my bad...) -9. Refactor CSS use mixins(which means I should learn SCSS hard...) - -## RoadMap -v0.3 cascader - -v0.4 refactor popover - -v0.5 finish all planned components - -v0.6 add keyboard event on planned components - -v0.7 refactor form component - -v0.8 refactor table component - -v0.9 fulfill props for all components - -v0.10 split icons for components - -v0.11 refactor css - -v0.12 import on demand - -v0.13 i18n - -v0.14 unit test - -v0.15 light theme - -v0.16 refactor using proper html tags - -v0.17 document formation - -v0.18 refactor document page - +[www.naiveui.com](www.naiveui.com) diff --git a/build/webpack.dev.js b/build/webpack.dev.js index f3287f973..778b2c0b8 100644 --- a/build/webpack.dev.js +++ b/build/webpack.dev.js @@ -41,7 +41,7 @@ const webpackConfig = { new webpack.HotModuleReplacementPlugin(), new HtmlWebpackPlugin({ template: './demo/index.tpl', - filename: './index.html' + favicon: './demo/assets/images/naivelogo.png' }), new VueLoaderPlugin(), new webpack.LoaderOptionsPlugin({ diff --git a/build/webpack.doc.js b/build/webpack.doc.js index e6ba7fbfa..2f294ec0a 100644 --- a/build/webpack.doc.js +++ b/build/webpack.doc.js @@ -34,7 +34,7 @@ const webpackConfig = { plugins: [ new HtmlWebpackPlugin({ template: './demo/index.tpl', - filename: './index.html' + favicon: './demo/assets/images/naivelogo.png' }), new VueLoaderPlugin(), new webpack.LoaderOptionsPlugin({ diff --git a/build/webpack.private-doc.js b/build/webpack.private-doc.js index c21ae1f05..320278335 100644 --- a/build/webpack.private-doc.js +++ b/build/webpack.private-doc.js @@ -7,9 +7,10 @@ const config = require('./config') const HtmlWebpackPlugin = require('html-webpack-plugin') const VueLoaderPlugin = require('vue-loader/lib/plugin') const ExtractTextPlugin = require('extract-text-webpack-plugin') +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const webpackConfig = { - mode: 'development', + mode: 'production', entry: './demo/privateIndex.js', output: { path: path.resolve(__dirname, '..', 'doc', 'dist'), @@ -34,7 +35,7 @@ const webpackConfig = { plugins: [ new HtmlWebpackPlugin({ template: './demo/index.tpl', - filename: './index.html' + favicon: './demo/assets/images/naivelogo.png' }), new VueLoaderPlugin(), new webpack.LoaderOptionsPlugin({ @@ -44,7 +45,8 @@ const webpackConfig = { } } }), - new ExtractTextPlugin('[name].[hash:7].css') + new ExtractTextPlugin('[name].[hash:7].css'), + new BundleAnalyzerPlugin() ] } diff --git a/build/webpack.release.js b/build/webpack.release.js index 24638048f..6875227a8 100644 --- a/build/webpack.release.js +++ b/build/webpack.release.js @@ -63,10 +63,9 @@ const webpackConfig = { ] }, plugins: [ - new webpack.HotModuleReplacementPlugin(), new HtmlWebpackPlugin({ template: './demo/index.tpl', - filename: './index.html' + favicon: './demo/assets/images/naivelogo.png' }), new VueLoaderPlugin(), new webpack.LoaderOptionsPlugin({ diff --git a/demo/SourceBlock.vue b/demo/SourceBlock.vue index 75207405a..8183098ee 100644 --- a/demo/SourceBlock.vue +++ b/demo/SourceBlock.vue @@ -1,14 +1,13 @@ -->value: {{ JSON.stringify(value) }}-
value: {{ JSON.stringify(value) }}-
value: {{ JSON.stringify(value) }}-
value: {{ JSON.stringify(value) }}-
value: {{ JSON.stringify(value) }}-
value: {{ JSON.stringify(value) }}-
value: {{ JSON.stringify(value1) }}-
value: {{ JSON.stringify(value2) }}-
value: {{ JSON.stringify(value3) }}-
Inspect some value here-
name: {{ name }}-
Inspect some value here-
Inspect some value here-