diff --git a/README.md b/README.md index 475edf4cb7312de007874293cd98418895fd7f91..6493c997ae74d13e286d8e898b23b7404a7cb440 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,24 @@ umi blocks of Ant Design Pro. -> A part of [Ant Design Pro V4](https://github.com/ant-design/ant-design-pro/issues/3143), still in progress. +A part of [Ant Design Pro V4](https://github.com/ant-design/ant-design-pro/issues/3143), still in progress. + +## dev ## Usage ```shell -$ umi block add [the github url of block] +umi block add [the github url of block] ``` You can visit umi [doc](https://umijs.org/guide/block.html) for find out more info about umi block. ## Contribute -```shell -$ cd [some block] -$ yarn # or npm install -$ yarn run dev # or npm run dev -``` - -Or +Enter the block you want to dev ```shell -$ yarn # or npm install -$ APP_ROOT=[some block] yarn run dev # or APP_ROOT=[someblock] npm run dev +cross-env PAGES_PATH='block_name' umi ``` + +> In complex typescript definitions, vscode may crash or tslint reports an error. You can restart the typescript service by "ctrl+shift+p > reload window" diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000000000000000000000000000000000000..2009e6015627012ce31a5f0ceca5c6ed7384361f --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,24 @@ +#pro-blocks + +Umi 块的 Ant Design Pro。 + +> [Ant Design Pro V4](https://github.com/ant-design/ant-design-pro/issues/3143)的官方区块 + +## 用法 + +```shell +umi block add [block github url] +``` + +你可以访问 umi [doc](https://umijs.org/guide/block.html)了解更多关于 umi block 的信息。 + +## 贡献 + +输入要开发的 block 名称 + +```shell +npm install +Cross-env PAGES_PATH ='block_name' umi dev +``` + +> 在复杂的 TypeScript 定义中,vscode 可能会崩溃或 tslint 报告错误。您可以通过 “ctrl + shift + p> reload window” 重新启动 TypeScript 服务 diff --git a/package.json b/package.json index 29bd845dca779b376b7469d89de294ed7d5590cf..e75158396873a8fdb0d93665fb63f3cb9f64d0c9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "lint-staged": "lint-staged", "lint-staged:ts": "tslint", "lint:fix": "npm run tslint:fix && npm run lint:style", - "lint:prettier": "check-prettier lint", + "lint:prettier": "check-prettier write", "lint:style": "stylelint --syntax less --fix **/**.less ", "lint:ts": "tslint -p . -c tslint.yml", "prettier": "node ./_scripts/prettier.js", @@ -32,7 +32,7 @@ "devDependencies": { "@types/classnames": "^2.2.7", "babel-eslint": "^10.0.1", - "check-prettier": "^1.0.1", + "check-prettier": "^1.0.3", "glob": "^7.1.3", "husky": "^2.2.0", "lint-staged": "^8.1.0",