2.2.0 • Published 3 years ago

@testdozer/ng-cmd-builder v2.2.0

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

Build Status NPM version:latest NPM version:next npm downloads Dependency Status Commitizen friendly semantic-release Renovate enabled npm bundle size (minified + gzip) License

This is an angular CLI builder that executes a cmd command. It runs the command with nodejs spawn.

At the moment schematics projects and another nodejs projects are not supported by the angular workspace due the lack of available builders.

npm install @testdozer/ng-cmd-builder -D

in angular.json

  "architect": {
        "build": {
          "builder": "@testdozer/ng-cmd-builder:build",
          "options": {
            "command": "npm run build:builder",
            "args": ["param"],
            "options":{
              "env": {"ENVIRONMENT_PARAM": "value"}
            }
          }
        }
  }

The builder supports options that reflect subset of spawn options, and they have the same meaning.

/**
 * Options for CMD Builder
 */
export interface Schema {
    /**
     * The command to run.
     */
    command: string;
    /**
     * List of string arguments.
     */
    args?: string[];
    /**
     * Environment key-value pairs.
     */
    options?: {
        env?: { [name: string]: string; };
        /**
         * Current working directory
         */
        cwd?: string;
        /**
         * <boolean> | <string> If true, runs command inside of a shell. Uses '/bin/sh' on Unix, and process.env.ComSpec on Windows.
         * A different shell can be specified as a string. See Shell requirements and Default Windows shell. Default: true.
         */
        shell: string;
        /**
         * Hide the subprocess console window that would normally be created on Windows systems.
         */
        windowsHide?: boolean;
    };
}

Supported options json schema

2.1.2

3 years ago

2.2.0

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.0

3 years ago

1.2.5

4 years ago

1.2.4

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago