ng-packagr

  • Version 12.2.3
  • Published
  • 454 kB
  • 27 dependencies
  • MIT license

Install

npm i ng-packagr
yarn add ng-packagr
pnpm add ng-packagr

Overview

Compile and package Angular libraries in Angular Package Format (APF)

Index

Variables

variable build

const build: Command<CliArguments, void>;
  • Command running an "one-off" build.

variable version

const version: Command<any, void>;
  • Prints version information.

Functions

function execute

execute: <A, R>(command: Command<A, R>, args?: A) => Promise<R>;
  • Executes a Command and returns its promisified result.

function ngPackagr

ngPackagr: () => NgPackagr;

    Classes

    class NgPackagr

    class NgPackagr {}
    • The original ng-packagr implemented on top of a rxjs-ified and di-jectable transformation pipeline.

      See the docs/transformations.md for more prose description.

      https://github.com/ng-packagr/ng-packagr/pull/572

    constructor

    constructor(providers: any[]);

      method build

      build: () => Promise<void>;
      • Builds the project by kick-starting the 'build' transform over an (initially) empty BuildGraph`

        A promisified result of the transformation pipeline.

      method buildAsObservable

      buildAsObservable: () => any;
      • Builds the project by kick-starting the 'build' transform over an (initially) empty BuildGraph`

        An observable result of the transformation pipeline.

      method forProject

      forProject: (project: string) => NgPackagr;
      • Sets the path to the user's "ng-package" file (either package.json, ng-package.json, or ng-package.js)

        Parameter project

        File path Self instance for fluent API

      method watch

      watch: () => any;
      • Builds and watch for changes by kick-starting the 'watch' transform over an (initially) empty BuildGraph`

        An observable result of the transformation pipeline.

      method withBuildTransform

      withBuildTransform: (transform: any) => NgPackagr;
      • Overwrites the 'build' transform.

        Parameter transform

        Self instance for fluent API

      method withOptions

      withOptions: (options: NgPackagrOptions) => NgPackagr;
      • Adds options to ng-packagr

        Parameter options

        Ng Packagr Options Self instance for fluent API

      method withProviders

      withProviders: (providers: Provider[]) => NgPackagr;
      • Adds dependency injection providers.

        Parameter providers

        Self instance for fluent API https://github.com/mgechev/injection-js

      method withTsConfig

      withTsConfig: (defaultValues: ParsedConfiguration | string) => NgPackagr;
      • Overwrites the default TypeScript configuration.

        Parameter defaultValues

        A tsconfig providing default values to the compilation. Self instance for fluent API

      Interfaces

      interface CliArguments

      interface CliArguments {}
      • CLI arguments passed to ng-packagr executable and build() command.

      property config

      config?: string;
      • Path to a tsconfig file.

      property project

      project: string;
      • Path to the project file 'package.json', 'ng-package.json', or 'ng-package.js'.

      property watch

      watch?: boolean;
      • Whether or not ng-packagr will watch for file changes and perform an incremental build.

      interface Command

      interface Command<Arguments, Result> {}
      • Common call signature for a command.

      call signature

      (args?: Arguments): Result | Promise<Result>;

        Package Files (5)

        Dependencies (27)

        Dev Dependencies (0)

        No dev dependencies.

        Peer Dependencies (3)

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ng-packagr.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/ng-packagr)
        • HTML
          <a href="https://www.jsdocs.io/package/ng-packagr"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>