Skip to content

Commit

Permalink
feat:update --info tips
Browse files Browse the repository at this point in the history
  • Loading branch information
FliPPeDround committed Jun 11, 2024
1 parent 5fca489 commit 8baf2e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/info/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import process from 'node:process'
import { getPackageInfo, isPackageExists } from 'local-pkg'
import envinfo from 'envinfo'
import { gray, italic, link, yellow } from 'kolorist'
import { gray, italic, link, red } from 'kolorist'
import { question } from './question'
import { ora } from '@/utils'

Expand All @@ -16,11 +16,11 @@ const uniDependenciesMap = {
async function getuniHelperDependencies() {
const isUniPkg = isPackageExists('@dcloudio/uni-app')
if (!isUniPkg) {
console.log(yellow('当前目录未安装uni-app,无法获取依赖信息'))
console.log('')
console.log()

Check warning on line 19 in src/commands/info/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
console.log(red(' ⛔ 当前目录未安装uni-app,请在uni-app项目根目录下执行, 以获取依赖信息!!!'))

Check warning on line 20 in src/commands/info/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
console.log()

Check warning on line 21 in src/commands/info/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
return []
}

const { packageJson } = (await getPackageInfo('.'))!
const dependencies = Object.keys({ ...packageJson.dependencies, ...packageJson.devDependencies })
const uniHelperDependencies = dependencies.filter(item => item.includes('@uni-helper'))
Expand Down

0 comments on commit 8baf2e1

Please sign in to comment.