@leax/cli-shared-utils

2.2.0 • Public • Published

Used

  npm install @leax/cli-shared-cli
  // or
  yarn add @leax/cli-shared-cli
  // or
  pnpm install @leax/cli-shared-cli

  export declare const hasGit: () => boolean
  export declare const hasProjectGit: (cwd: string) => any
  export declare const hasYarn: () => boolean
  export declare const hasProjectYarn: (cwd: string) => boolean
  export declare const hasProjectNpm: (cwd: string) => any

  export declare const resolveModule: (request: string, context: string) => any
  export declare const loadModule: (request: string, context: string, force?: boolean) => any
  export declare const clearModule: (request: string, context: string) => void
  export declare const clearRequireCache: (id: string, map?: Map<any, any>) => void

  export declare const log: (text: string) => void
  export declare const done: (text: string) => void
  export declare const warn: (text: string) => void
  export declare const error: (text: string) => void
  export declare const clearConsole: (title?: string) => void

  export declare const logWithSpinner: (symbol: string, msg?: string) => void
  export declare const stopSpinner: (persist?: boolean) => void

  export declare const isPlugin: (id: string) => boolean
  export declare const matchPluginId: (id: string, pid: string) => boolean

  export declare const resolvePkg: (context: string) => any

  export declare const request: {
    get(url: string, opts: any): any
  }

  export { default as chalk } from 'chalk'
  export { default as ora } from 'ora'
  export { default as LRU } from 'lru-cache'

Package Sidebar

Install

npm i @leax/cli-shared-utils

Weekly Downloads

1

Version

2.2.0

License

MIT

Unpacked Size

30.1 kB

Total Files

13

Last publish

Collaborators

  • ruichao