NPM Build Utilities @ 0.1.3
    Preparing search index...

    Class SnapshotStage

    Default snapshot stage.

    0.1.0-alpha

    Hierarchy (View Summary)

    Index

    Config

    A completed args object for this instance.

    clr: Colour

    Colour used for colour-coding this stage.

    config: Config.Class

    Complete project configuration.

    filename: string

    Output name for the snapshot zip.

    name: string

    Name for this stage used for notices.

    params: Params

    Current CLI params.

    path: string

    Output directory for the snapshot.

    • get ARGS_DEFAULT(): { ignoreGlobs: (_stage: Stage) => string[]; utils: {} }

      Default args for this stage.

      Returns { ignoreGlobs: (_stage: Stage) => string[]; utils: {} }

    Constructor

    Errors

    • Alias for internal.writeLog.

      Parameters

      • msg: string | string[] | BulkMsgs

        Log message to write.

      • filename: string

        File name for the log.

      • subDir: string[] = []

        Subdirectories used for the path to write the log file.

      • date: null | Date = null

        Used for the timestamp.

      Returns string | false

      If false, writing the log failed. Otherwise, this is the path to the written log file.

    Project

    • get pkg(): {
          bin: undefined
          | string
          | { [key: string]: string };
          bugs: undefined | { email?: string; url?: string };
          config: undefined | { [key: string | number]: any };
          description: undefined | string;
          engines: undefined | { [key: string]: string };
          files: undefined | string[];
          homepage: undefined | string;
          license: undefined | string;
          main: undefined | string;
          name: string;
          repository: undefined | string;
          version: string;
      }

      Current value of the package.json file for this project.

      Returns {
          bin: undefined | string | { [key: string]: string };
          bugs: undefined | { email?: string; url?: string };
          config: undefined | { [key: string | number]: any };
          description: undefined | string;
          engines: undefined | { [key: string]: string };
          files: undefined | string[];
          homepage: undefined | string;
          license: undefined | string;
          main: undefined | string;
          name: string;
          repository: undefined | string;
          version: string;
      }

    Running

    subStages: "snap"[] = ...

    All sub-stages to run in this stage (in order).

    Sub-Stages

    Utilities

    compiler: Stage_Compiler

    Instance used to compile files from the src directory.

    console: Stage_Console

    Instance used to send messages to the console.

    • Replaces placeholders in files as defined by Config.replace.

      Parameters

      • globs: string[]

        Where to find & replace placeholders.

      • version: "package" | "current"

        Which version of the replacements to run.

      • level: number

        Depth level for output to the console.

      • ignore: string[] = []

        Globs to ignore while replacing. Default FileSystem.globs.SYSTEM.

      • docsMode: boolean = false

        Whether to make the replacements in 'docs' mode (i.e., assumes markdown in comments was converted to HTML).

      Returns string[]

      Paths where placeholders were replaced.