Skip to content

Commit fc2cb3a

Browse files
authored
chore: check logic (#14)
* chore: check logic * chore: bump version
1 parent 414be15 commit fc2cb3a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rc-component/father-plugin",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "The father plugin for all react-component projects",
55
"keywords": [],
66
"repository": "https://github.com/react-component/father-plugin.git",

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ export default (api: IApi) => {
2323
// Break if current project not install `@rc-component/np`
2424
const packageJson = await fs.readJson(path.join(cwd, 'package.json'));
2525

26-
// Break if current project not install `@rc-component/np`
27-
if (!checkNpmPackageDependency(packageJson, '@rc-component/np')) {
26+
if (
27+
checkNpmPackageDependency(packageJson, 'np') &&
28+
!checkNpmPackageDependency(packageJson, '@rc-component/np')
29+
) {
2830
console.log('Please install `@rc-component/np` instead of `np`.');
2931
process.exit(1);
3032
}

0 commit comments

Comments
 (0)