@iapetos/angular-packager
Builds and packages libraries into the [Angular Package Format][apf].
Last updated a month ago by bgotink .
MIT · Original npm · Tarball · package.json
$ cnpm install @iapetos/angular-packager 
SYNC missed versions from official npm registry.

@iapetos/angular-packager

Builds and packages libraries into the Angular Package Format.

Installation

yarn add @iapetos/angular-packager

Usage example

The iapetos packager only exposes a node API, there's no builtin CLI.

const {build} = require('@iapetos/angular-packager');

build({
  primaryEntryPoint: './package.json',
  secondaryEntryPoints: [
    './testing/package.json',
  ],
});

The available options are:

interface BuildOptions {
  /**
   * Path to the manifest (package.json) for the package's main entry point
   */
  primaryEntryPoint: string;

  /**
   * Path to the manifests (package.json) for the package's secondary entry points, if any
   */
  secondaryEntryPoints?: string[];

  /**
   * Path to the target folder, defaults to `$(dirname primaryEntryPoint)/dist`
   */
  targetFolder?: string;

  /**
   * Path to a tsconfig to use, if any
   */
  tsConfigPath?: string;

  /**
   * Extra mapping of package name to global name to use when building UMD modules
   *
   * By default a package will map using the algorithm angular uses to define their globals:
   *
   * 1. strip the leading `@` of the scope name (if the package is scoped)
   * 2. split the package name by `/`
   * 3. map every part from `kebab-case` to `lowerCamelCase`
   * 4. join the parts using a `.`
   *
   * For example, if the fictional `@iapetus-component/fancy-button` package would map to
   * `iapetusComponent.fancyButton`
   */
  extraGlobals?: Record<string, string>;

  /**
   * Extra package names to mark as external when building flat ESM bundles and UMD bundles
   *
   * This should never be needed. The externals are computed from the package manifest: all
   * `dependencies` and `peerDependencies` become externals, apart from those listed in
   * `bundledDependencies`.
   */
  extraExternals?: string[];
}

Current Tags

  • 0.1.0                                ...           latest (a month ago)

1 Versions

  • 0.1.0                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 25
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |