Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add plugin api for umi block #1436

Merged
merged 7 commits into from
Nov 13, 2018
Merged

feat: add plugin api for umi block #1436

merged 7 commits into from
Nov 13, 2018

Conversation

yutingzhao1991
Copy link
Contributor

@yutingzhao1991 yutingzhao1991 commented Nov 9, 2018

api._modifyBlockDependenciesPackageJSONPath() // => /xxx/package.json
api._modifyBlockDependenciesCheckResult() // => { lacks[['antd', '^3.0.0']], conflicts: [['moment', '^2.3.0', '2.1.0']]}
api._modifyBlockContent() // => code

modify new api name: _modifyBlockPackageJSONPath, _modifyBlockDependencies, _modifyBlockFile

and support singular

@yutingzhao1991
Copy link
Contributor Author

_modifyBlockDependenciesPackageJSONPath 用于修改安装物料 block 依赖是读取的 package.json 目录。这个名字会不会太长...

@coveralls
Copy link

coveralls commented Nov 9, 2018

Pull Request Test Coverage Report for Build 1949

  • 11 of 32 (34.38%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.4%) to 33.419%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/umi-build-dev/src/plugins/commands/block/block.js 10 31 32.26%
Files with Coverage Reduction New Missed Lines %
packages/umi-test/src/index.js 2 0.0%
Totals Coverage Status
Change from base Build 1930: 0.4%
Covered Lines: 1152
Relevant Lines: 3512

💛 - Coveralls

@sorrycc
Copy link
Member

sorrycc commented Nov 9, 2018

建议 _modifyBlockPackageJSONPath, _modifyBlockDependencies, _modifyBlockFile

@@ -2,7 +2,7 @@ import { join } from 'path';
import { insertRouteContent, getRealRoutesPath } from './writeNewRoute';

describe('insertRouteContent', () => {
it.only('getRealRoutesPath in antdpro', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only 去掉。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉了,之前不小心提到 master 了,这个是去掉的。

@sorrycc sorrycc merged commit 01ecc63 into master Nov 13, 2018
@sorrycc sorrycc deleted the feat/block-singular branch November 13, 2018 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants