Skip to content

Commit

Permalink
检查原子服务定义文件前增加对应用类型的判断,只对快应用进行检查
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkanhw committed Jun 29, 2019
1 parent 6ed17c3 commit a6ce5d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/taro-cli/bin/taro-doctor
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ if (!fs.existsSync(PROJECT_CONF_PATH)) {
}

const { validators } = require('../dist/doctor').default
const abilityXMLValidator = require('../dist/doctor/abilityXMLValidator').default
const QUICKAPP_CONF_PATH = path.join(appPath, 'project.quickapp.json')
if (fs.existsSync(QUICKAPP_CONF_PATH)) {
validators.push(abilityXMLValidator)
}

const NOTE_ALL_RIGHT = chalk.green('[✓] ')
const NOTE_VALID = chalk.yellow('[!] ')
Expand Down
4 changes: 1 addition & 3 deletions packages/taro-cli/src/doctor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import configValidator from './configValidator';
import packageValidator from './packageValidator';
import recommandValidator from './recommandValidator';
import eslintValidator from './eslintValidator';
import abilityXMLValidator from './abilityXMLValidator';

export default {
validators: [
configValidator,
packageValidator,
recommandValidator,
eslintValidator,
abilityXMLValidator
eslintValidator
]
}

0 comments on commit a6ce5d5

Please sign in to comment.