Skip to content

aitboudad/ng-packagr

 
 

Repository files navigation

ng-packagr

Compile and package a TypeScript library to Angular Package Format

npm npm License Conventional Commits CircleCI Travis

Greenkeeper badge David David

GitHub stars npm Downloads GitHub contributors GitHub issues GitHub pull requests

Usage Example

For an Angular library, create one configuration file ng-package.json:

{
  "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
  "lib": {
    "entryFile": "public_api.ts"
  }
}

Then, build the library from a npm/yarn script defined in package.json:

{
  "scripts": {
    "build": "ng-packagr -p ng-package.json"
  }
}
$ yarn build

Alternatively, build the library with the following command:

$ node_modules/.bin/ng-packagr -p ng-package.json

Pathes are resolved relative to the location of the ng-package.json file. The package.json describing the library should be located in the same folder, next to ng-package.json.

Knowledge

Packaging Angular - Jason Aden

About

Compile a TypeScript library and build it in Angular Package Format

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 90.1%
  • JavaScript 8.6%
  • Other 1.3%