Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils"

Index

Variables

_pkg

_pkg: any

colurs

colurs: IColurs = clrs.get()

cwd

cwd: string = process.cwd()

log

log: Logger = logger.get()

Functions

bump

  • bump(): object
  • Bump Bumps project to next version.

    Returns object

    • name: any
    • original: any
    • version: any

clean

  • clean(globs: string | string[]): void
  • Clean Removes file(s) using provided glob(s).

    Parameters

    • globs: string | string[]

      glob or array of glob strings.

    Returns void

copy

  • copy(src: string, dest: string): boolean
  • Copy Copies source to target. Does NOT support globs.

    Parameters

    • src: string

      the source path to be copied.

    • dest: string

      the destination path to copy to.

    Returns boolean

copyAll

  • Copy All Takes collection and copies to destination.

    Parameters

    Returns void

getParsed

  • getParsed(filename: any): ParsedPath
  • Parameters

    • filename: any

    Returns ParsedPath

getRelative

  • getRelative(filename: any): string
  • Parameters

    • filename: any

    Returns string

layout

  • layout(width?: number, wrap?: boolean): object
  • Layout Creates a CLI layout much like creating divs in the terminal. Supports strings with \t \s \n or IUIOptions object.

    see

    https://www.npmjs.com/package/cliui

    Parameters

    • Optional width: number

      the width of the layout.

    • Optional wrap: boolean

      if the layout should wrap.

    Returns object

    • div: div
    • render: render
    • span: span
    • ui: any

pkg

  • pkg(val?: any): any
  • Pkg Loads the package.json file for project or saves package.json.

    Parameters

    • Optional val: any

      the package.json object to be written to file.

    Returns any

platform

  • platform(): object
  • Platform Gets information and paths for the current platform.

    Returns object

    • arch: string
    • cpu: ICpu
    • homedir: string
    • hostname: string
    • platform: any
    • release: string

serve

  • serve(name?: string | Options, options?: Options | boolean, init?: boolean): BrowserSyncInstance
  • Serve Hook to Browser Sync accepts name and options returning a Browser Sync Server Instance.

    see

    https://www.browsersync.io/docs/api

    Parameters

    • Optional name: string | Options

      the name of the server or Browser Sync options.

    • Optional options: Options | boolean

      the Browser Sync Options.

    • Optional init: boolean

    Returns BrowserSyncInstance

stringBuilder

  • String Builder Builds string then joins by char with optional colorization.

    Parameters

    • Optional str: any

      the base value to build from if any.

    Returns IStringBuilderMethods

Private stringFormat

  • stringFormat(str: any, ...args: any[]): any
  • String Format Very simple string formatter by index. Supports using %s or %n chars.

    Parameters

    • str: any

      the string to be formatted.

    • Rest ...args: any[]

      arguments used for formatting.

    Returns any

tsnodeRegister

Generated using TypeDoc