NPM Build Utilities @ 0.1.3
    Preparing search index...

    Class ReleaseStage

    Default release 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.

    name: string

    Name for this stage used for notices.

    params: Params

    Current CLI params.

    • get ARGS_DEFAULT(): {
          commit: null;
          replace: (
              _stage: Stage,
          ) => {
              ignore: [
                  ".git/**",
                  "**/.git/**",
                  ".scripts/**",
                  "**/.scripts/**",
                  ".vscode/**/*.code-snippets",
                  ".vscode/**/settings.json",
                  "node_modules/**",
                  "**/node_modules/**",
                  "._*",
                  "._*/**",
                  "**/._*",
              ];
              package: [string, string, string, string];
          };
          utils: {};
      }

      Default args for this stage.

      Returns {
          commit: null;
          replace: (
              _stage: Stage,
          ) => {
              ignore: [
                  ".git/**",
                  "**/.git/**",
                  ".scripts/**",
                  "**/.scripts/**",
                  ".vscode/**/*.code-snippets",
                  ".vscode/**/settings.json",
                  "node_modules/**",
                  "**/node_modules/**",
                  "._*",
                  "._*/**",
                  "**/._*",
              ];
              package: [string, string, string, string];
          };
          utils: {};
      }

    Constants

    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: Stage.SubStage.Release[] = ...

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

        public readonly subStages: Stage.SubStage.Release[] = [
    'changelog',
    'package',
    'replace',
    'commit',
    'github',
    'tidy',
    ];

    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.