{"id":13495695,"url":"https://github.com/ng-packagr/ng-packagr","last_synced_at":"2026-01-16T11:57:53.091Z","repository":{"id":37251446,"uuid":"91553810","full_name":"ng-packagr/ng-packagr","owner":"ng-packagr","description":"Compile and package Angular libraries in Angular Package Format (APF)","archived":false,"fork":false,"pushed_at":"2025-05-08T08:04:37.000Z","size":25195,"stargazers_count":1853,"open_issues_count":15,"forks_count":301,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-05-08T20:55:59.313Z","etag":null,"topics":["angular","angular-cli","angular-library","angular-package-format","component-library","css","html","less","scss","stylus","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ng-packagr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-17T08:43:27.000Z","updated_at":"2025-05-08T08:04:41.000Z","dependencies_parsed_at":"2022-07-14T04:50:34.613Z","dependency_job_id":"28b6e543-fcb0-40f4-a59e-93d77fdcd0a7","html_url":"https://github.com/ng-packagr/ng-packagr","commit_stats":{"total_commits":2423,"total_committers":80,"mean_commits":30.2875,"dds":0.617416425918283,"last_synced_commit":"d5d65076953785ea033653dad23dfce42f21c200"},"previous_names":["dherges/ng-packagr"],"tags_count":363,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-packagr%2Fng-packagr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-packagr%2Fng-packagr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-packagr%2Fng-packagr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-packagr%2Fng-packagr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ng-packagr","download_url":"https://codeload.github.com/ng-packagr/ng-packagr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253156845,"owners_count":21863012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-cli","angular-library","angular-package-format","component-library","css","html","less","scss","stylus","typescript"],"created_at":"2024-07-31T19:01:37.253Z","updated_at":"2026-01-16T11:57:53.079Z","avatar_url":"https://github.com/ng-packagr.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Angular"],"sub_categories":["Builders"],"readme":"# ng-packagr\n\n\u003e Compile and package Angular libraries in Angular Package Format (APF)\n\n\n[![npm](https://img.shields.io/npm/v/ng-packagr.svg?style=flat-square)](https://www.npmjs.com/package/ng-packagr)\n[![npm License](https://img.shields.io/npm/l/ng-packagr.svg?style=flat-square)](https://github.com/ng-packagr/ng-packagr/blob/main/LICENSE)\n[![CircleCI](https://img.shields.io/circleci/project/github/ng-packagr/ng-packagr/main.svg?label=Circle%20CI\u0026style=flat-square)](https://circleci.com/gh/ng-packagr/ng-packagr)\n\n[![GitHub stars](https://img.shields.io/github/stars/ng-packagr/ng-packagr.svg?label=GitHub%20Stars\u0026style=flat-square)](https://github.com/ng-packagr/ng-packagr)\n[![npm Downloads](https://img.shields.io/npm/dw/ng-packagr.svg?style=flat-square)](https://www.npmjs.com/package/ng-packagr)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square)](https://renovateapp.com/)\n\n## Installation\n\n```bash\nnpm install -D ng-packagr\n```\n\n## Usage Example\n\nLet's walk through a _getting started_ that'll build an Angular library from TypeScript sources and create a distribution-ready npm package:\ncreate a `ng-package.json` file and run `ng-packagr -p ng-package.json`\n– Here we go:\n\n```json\n{\n  \"$schema\": \"./node_modules/ng-packagr/ng-package.schema.json\",\n   ...\n}\n```\n\nYou can easily run _ng-packagr_ through a npm/yarn script:\n\n```json\n{\n  \"scripts\": {\n    \"build\": \"ng-packagr -p ng-package.json\"\n  }\n}\n```\n\nNow, execute the build with the following command:\n\n```bash\n$ yarn build\n```\n\nThe build output is written to the `dist` folder, containing all those _binaries_ to meet the Angular Package Format specification.\nYou'll now be able to go ahead and `npm publish dist` your Angular library to the npm registry.\n\nDo you like to publish more libraries?\nIs your code living in a monorepo?\nCreate one `package.json` per npm package, run _ng-packagr_ for each!\n\n## Features\n\n* :gift: Implements [Angular Package Format](https://angular.dev/tools/libraries/angular-package-format)\n  * :checkered_flag: Bundles your library in FESM2022\n  * :school_satchel: npm package can be consumed by [Angular CLI](https://github.com/angular/angular-cli), [Webpack](https://github.com/webpack/webpack), or ESM Bundlers\n  * :dancer: Creates type definitions (`.d.ts`)\n* :mag_right: Creates [scoped and non-scoped packages](https://docs.npmjs.com/misc/scope) for publishing to npm registry\n* :surfer: Inlines Templates and Stylesheets\n* :sparkles: CSS Features\n  * :camel: Runs [SCSS](http://sass-lang.com/guide) preprocessor, supporting custom include paths\n  * :monkey: Adds vendor-specific prefixes\n  * :tiger: Embed assets data\n\n\n## How to…\n- [Copy Assets](docs/copy-assets.md)\n- [Embed Assets in CSS](docs/embed-assets-css.md)\n- [Managing Dependencies](docs/dependencies.md)\n- [Change the Entry File of a Library](docs/entry-file.md)\n- [Change Configuration Locations](docs/configuration-locations.md)\n- [Override tsconfig](docs/override-tsconfig.md)\n- [Use PostCSS](docs/postcss-config.md)\n- [Add Style Include Paths](docs/style-include-paths.md)\n- [Package Secondary Entrypoints (sub packages)](docs/secondary-entrypoints.md)\n\n## Knowledge\n\n[Angular Package Format documentation](https://angular.dev/tools/libraries/angular-package-format)\n\nPackaging Angular Libraries - Jason Aden at Angular Mountain View Meetup ([Jan 2018, 45min talk](https://www.youtube.com/watch?v=QfvwQEJVOig\u0026t=3612s))\n\nCreate and publish Angular libs like a Pro - Juri Strumpflohner at NG-BE ([Dec 2017, 30min talk](https://youtu.be/K4YMmwxGKjY))\n\n[![Juri Strumpflohner - Create and publish Angular libs like a Pro](https://img.youtube.com/vi/K4YMmwxGKjY/0.jpg)](https://youtu.be/K4YMmwxGKjY)\n\nPackaging Angular - Jason Aden at ng-conf 2017 ([28min talk](https://youtu.be/unICbsPGFIA))\n\n[![Packaging Angular - Jason Aden](https://img.youtube.com/vi/unICbsPGFIA/0.jpg)](https://youtu.be/unICbsPGFIA)\n\n\nCreate and publish Angular libs like a Pro - Juri Strumpflohner at ngVikings, this time demoing building Angular libraries with ng-packagr, with NX as well as Bazel ([March 2018, 30min talk](https://youtu.be/Tw8TCgeqotg))\n\n[![Juri Strumpflohner - Create \u0026 Publish Angular Libs like a PRO at ngVikings](https://img.youtube.com/vi/Tw8TCgeqotg/0.jpg)](https://youtu.be/Tw8TCgeqotg)\n\n## Contributing to ng-packagr\n\n[General contribution guidelines](./CONTRIBUTING.md)\n\nIf you like to submit a pull request, you'll find it helpful to take a look at the [initial design document where it all started](./docs/DESIGN.md).\n\nTo orchestrate the different tools, ng-packagr features a [custom transformation pipeline](docs/transformation-pipeline.md#a-transformation-pipeline). The transformation pipeline is built on top of RxJS and Angular Dependency Injection concepts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-packagr%2Fng-packagr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fng-packagr%2Fng-packagr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-packagr%2Fng-packagr/lists"}