Skip to content

Commit

Permalink
test: cli 0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Apr 2, 2020
1 parent f278441 commit 1a20a89
Show file tree
Hide file tree
Showing 49 changed files with 1,278 additions and 716 deletions.
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**/*.html
**/*.txt
**/*.md
**/*.svg
**/*.ttf
**/*.woff
**/*.eot
package.json
lib/plugin/cli/site/doc/page
lib/plugin/cli/site/doc/view
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"singleQuote": true,
"semi": true,
"bracketSpacing": true,
"tabWidth": 4,
"printWidth": 150,
"useTabs": true,
"htmlWhitespaceSensitivity": "strict"
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
`2020-03-31`

* :sparkles: feat(Video):新增数据展示-视频组件 @vickyYE
* :sparkles: feat(TimeLine):新增时间轴组件 @yangxiaolu1993
* :sparkles: feat(Signature):新增业务类型-签名组件 @irisSong
* :sparkles: upd(TabSelect):新增确认按钮回调事件 @yi-ge
* :sparkles: upd(TextBox):新增v-model属性 @yi-ge
Expand Down
6 changes: 3 additions & 3 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NutUI 2
![npm version](https://img.shields.io/npm/v/@nutui/nutui.svg) [![Build Status](https://api.travis-ci.org/jdf2e/nutui.svg?branch=master)](https://github.com/jdf2e/nutui/) [![Coverage Status](https://coveralls.io/repos/github/jdf2e/nutui/badge.svg?branch=master)](https://coveralls.io/github/jdf2e/nutui?branch=master) ![license](https://img.shields.io/npm/l/@nutui/nutui.svg)

一套移动端轻量级Vue组件库
一套移动端轻量级组件库

![NutUI](https://img11.360buyimg.com/uba/jfs/t1/11117/21/3608/18942/5c20ab52E35e5a500/02e3c1f89cd3dad1.png)

Expand All @@ -10,8 +10,8 @@
## 特性

* 全新的架构
* 40+ 高质量组件
* 30+ 京东移动端项目正在使用
* 50+ 高质量组件
* 40+ 京东移动端项目正在使用
* 参照京东APP 7.0 视觉规范
* 支持按需加载
* 详尽的文档和示例
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NutUI 2
![npm version](https://img.shields.io/npm/v/@nutui/nutui.svg) [![Build Status](https://api.travis-ci.org/jdf2e/nutui.svg?branch=master)](https://github.com/jdf2e/nutui/) [![Coverage Status](https://coveralls.io/repos/github/jdf2e/nutui/badge.svg?branch=master)](https://coveralls.io/github/jdf2e/nutui?branch=master) ![license](https://img.shields.io/npm/l/@nutui/nutui.svg)

A light mobile Toolkit based on Vue
A light mobile Toolkit

![NutUI](https://img11.360buyimg.com/uba/jfs/t1/11117/21/3608/18942/5c20ab52E35e5a500/02e3c1f89cd3dad1.png)

Expand All @@ -10,8 +10,8 @@ English | [简体中文](./README-zh_CN.md)
## Features

* New structure
* 40+ Reusable components
* Used by 30+ JD mobile projects
* 50+ Reusable components
* Used by 40+ JD mobile projects
* Refer to JD APP 7.0 visual specification
* On-demand loading Support
* Detailed documents and examples
Expand Down
23 changes: 9 additions & 14 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@

const presets = [
[
"@babel/preset-env",
{
loose: true,
modules: false
}

],
[
'@babel/preset-env',
{
loose: true,
modules: false
}
]
];

const plugins = ['@babel/plugin-transform-runtime'];

const plugins = [
"@babel/plugin-transform-runtime",
];

module.exports = { presets, plugins };
module.exports = { presets, plugins };
44 changes: 14 additions & 30 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always', [
'upd',
'chore',
'docs',
'feat',
'fix',
'test',
'refactor',
'revert',
'style',
]
]
}
};
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [2, 'always', ['upd', 'chore', 'docs', 'feat', 'fix', 'test', 'refactor', 'revert', 'style']],
},
};
6 changes: 3 additions & 3 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NutUI

NutUI是一套京东风格的移动端Vue组件库,开发和服务于移动Web界面的企业级前中后台产品。
NutUI是一套京东风格的移动端组件库,开发和服务于移动Web界面的企业级前中后台产品。

<div style="margin:30px 0;">
<img src="http://img14.360buyimg.com/uba/jfs/t1/8543/6/11560/22014/5c2c6136E8023ac0a/6abbd9de10999c48.png" width="150" alt="NutUI">
Expand All @@ -14,8 +14,8 @@ NutUI是一套京东风格的移动端Vue组件库,开发和服务于移动Web

## 特性

* 40+ 高质量组件
* 30+ 京东移动端项目正在使用
* 50+ 高质量组件
* 40+ 京东移动端项目正在使用
* 基于京东APP 7.0 视觉规范
* 支持按需加载
* 详尽的文档和示例
Expand Down
2 changes: 1 addition & 1 deletion docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ import '@nutui/nutui/dist/nutui.css';
NutUI.install(Vue);
```

> 注意:这种方式将会导入所有组件
> 注意:这种方式将会导入所有组件,我们比较建议您采用下面 按需加载方式
## 按需加载

Expand Down
121 changes: 66 additions & 55 deletions eslint-config.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,71 @@
module.exports = {
extends: ['eslint:recommended'],
extends: ['plugin:vue/recommended'],

env: {
es6: true,
node: true,
jest: true,
browser: true
},
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2018,
sourceType: 'module',
extraFileExtensions: ['.vue'],
},

globals: {
window: false,
document: false,
navigator: false
},
plugins: ['@typescript-eslint'],

rules: {
'no-new': 0,
'no-shadow': 0,
camelcase: 1,
'no-bitwise': 0,
'func-names': 0,
'no-console': 0,
'no-plusplus': 0,
'arrow-parens': 0,
'comma-dangle': 0,
'default-case': 0,
'prefer-template': 0,
'consistent-return': 0,
'no-param-reassign': 0,
'no-nested-ternary': 0,
'operator-linebreak': 0,
'object-curly-newline': 0,
'no-underscore-dangle': 1,
'no-unused-expressions': 0,
'no-restricted-globals': 0,
'function-paren-newline': 0,
'class-methods-use-this': 0,
'implicit-arrow-linebreak': 0,
'space-before-function-paren': 0,
'max-len': ['error', { code: 150 }],
'prefer-destructuring': ['error', { object: true, array: false }],
'import/order': 0,
'import/extensions': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 0,
'vue/no-v-html': 0,
'vue/attributes-order': 0,
'vue/require-v-for-key': 0,
'vue/require-default-prop': 0,
'vue/no-unused-components': 0,
'vue/max-attributes-per-line': 0,
'vue/singleline-html-element-content-newline': 0,
'vue/name-property-casing': ['error', 'kebab-case'],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/html-closing-bracket-newline': 2,
'@typescript-eslint/no-unused-vars': ['error']
}
env: {
es6: true,
node: true,
jest: true,
browser: true,
},

globals: {
window: false,
document: false,
navigator: false,
},

rules: {
'no-new': 0,
'no-shadow': 0,
camelcase: 1,
'no-bitwise': 0,
'func-names': 0,
'no-console': 0,
'no-plusplus': 0,
'arrow-parens': 0,
'comma-dangle': 0,
'default-case': 0,
'prefer-template': 0,
'consistent-return': 0,
'no-param-reassign': 0,
'no-nested-ternary': 0,
'operator-linebreak': 0,
'object-curly-newline': 0,
'no-underscore-dangle': 1,
'no-unused-expressions': 0,
'no-restricted-globals': 0,
'function-paren-newline': 0,
'class-methods-use-this': 0,
'implicit-arrow-linebreak': 0,
'space-before-function-paren': 0,
'max-len': ['error', { code: 150 }],
'prefer-destructuring': ['error', { object: true, array: false }],
'import/order': 0,
'import/extensions': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 0,
'vue/no-v-html': 0,
'vue/attributes-order': 0,
'vue/require-v-for-key': 0,
'vue/require-default-prop': 0,
'vue/no-unused-components': 0,
'vue/max-attributes-per-line': 0,
'vue/singleline-html-element-content-newline': 0,
'vue/name-property-casing': ['error', 'kebab-case'],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/html-closing-bracket-newline': 2,
'@typescript-eslint/no-unused-vars': ['error'],
'vue/html-indent': 0,
'vue/html-self-closing': 0,
},
};
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
"CHANGELOG.md"
],
"scripts": {
"dev": " nutui-cli dev",
"dev": "nutui-cli dev",
"build": "nutui-cli build",
"build:site": "nutui-cli build-site",
"clean": "nutui-cli clean",
"add": "nutui-cli add",
"lint": "nutui-cli lint",
"test": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config node_modules/@nutui/cli/dist_cli/webpack/test.config.js --require node_modules/@nutui/cli/dist_cli/test/setup.js src/packages/*/__test__/**.spec.js",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"test:watch": "npm run test --watch"
"test:watch": "npm run test --watch",
"prettier:check": "prettier -l {lib,src}/**/**/*.{ts,js,vue,scss}",
"prettier:fix": "prettier --write {lib,src}/**/**/*.{ts,js,vue,scss}"
},
"repository": {
"type": "git",
Expand All @@ -40,7 +42,6 @@
"keywords": [
"nutui",
"nutui2",
"nutui3",
"vue",
"webpack",
"vue component",
Expand All @@ -52,14 +53,19 @@
"dependencies": {
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@nutui/cli": "^0.0.8",
"@nutui/cli": "^0.0.9",
"@vue/composition-api": "^0.5.0",
"husky": "^3.0.0",
"ts-loader": "^6.2.2",
"vue-lazyload": "^1.3.3"
},
"peerDependencies": {
"vue": "^2.6.10"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.16.0",
"@typescript-eslint/parser": "^2.16.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-vue": "^6.1.2",
"stylelint-config-standard": "^19.0.0"
},
Expand All @@ -73,10 +79,5 @@
],
"instrument": false,
"sourceMap": false
},
"browserslist": [
"> 3%",
"Android >= 4",
"iOS >= 8"
]
}
}
}
20 changes: 20 additions & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,26 @@
"sort": "6",
"showDemo": true,
"author": "irisSong"
},
{
"version": "1.0.0",
"name": "TimeLine",
"chnName": "时间轴",
"desc": "对一系列数据进行展示,垂直展示",
"type": "component",
"sort": "0",
"showDemo": true,
"author": "yangxiaolu"
},
{
"version": "1.0.0",
"name": "TimeLineItem",
"chnName": "时间轴节点",
"desc": "定义时间轴节点",
"type": "component",
"sort": "0",
"showDemo": false,
"author": "yangxiaolu"
}
]
}
Loading

0 comments on commit 1a20a89

Please sign in to comment.