Compile and package Angular libraries in Angular Package Format (APF). Paths in the ngPackage section are resolved relative to the location of the package.json file. In the above example, public_api.ts is the entry file to the library's sources and must be placed next to package.json (a sibling in the same folder). You can easily run ng-package through a npm/yarn script. The build output is written to the dist folder, containing all those binaries to meet the Angular Package Format specification. You'll now be able to go ahead and npm publish dist your Angular library to the npm registry. Do you like to publish more libraries? Is your code living in a monorepo? Create one package.json per npm package, run ng-packagr for each! Creates scoped and non-scoped packages for publishing to npm registry. Inlines Templates and Stylesheets. Runs SCSS preprocessor, supporting the relative ~ import syntax and custom include paths.

Features

  • You can easily run ng-packagr through a npm/yarn script
  • Implements Angular Package Format
  • Bundles your library in FESM2020
  • npm package can be consumed by Angular CLI, Webpack, or SystemJS
  • Creates type definitions (.d.ts)
  • Auto-discovers and bundles secondary entry points

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow ng-packagr

ng-packagr Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ng-packagr!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Software Development Software, TypeScript Compilers

Registered

2022-03-09