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
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
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