Gathering detailed insights and metrics for ng-packagr
Gathering detailed insights and metrics for ng-packagr
Gathering detailed insights and metrics for ng-packagr
Gathering detailed insights and metrics for ng-packagr
Compile and package Angular libraries in Angular Package Format (APF)
npm install ng-packagr
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.26%)
JavaScript (1.48%)
SCSS (0.42%)
HTML (0.37%)
Sass (0.15%)
Less (0.13%)
Shell (0.09%)
CSS (0.07%)
Stylus (0.04%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,852 Stars
2,572 Commits
298 Forks
48 Watchers
15 Branches
73 Contributors
Updated on Jul 15, 2025
Latest Version
20.1.0
Package Id
ng-packagr@20.1.0
Unpacked Size
715.59 kB
Size
180.89 kB
File Count
205
NPM Version
10.8.2
Node Version
20.19.3
Published on
Jul 09, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
21
4
1
Compile and package Angular libraries in Angular Package Format (APF)
1npm install -D ng-packagr
Let's walk through a getting started that'll build an Angular library from TypeScript sources and create a distribution-ready npm package:
create a ng-package.json
file and run ng-packagr -p ng-package.json
– Here we go:
1{ 2 "$schema": "./node_modules/ng-packagr/ng-package.schema.json", 3 ... 4}
You can easily run ng-packagr through a npm/yarn script:
1{ 2 "scripts": { 3 "build": "ng-packagr -p ng-package.json" 4 } 5}
Now, execute the build with the following command:
1$ yarn build
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!
.d.ts
)Angular Package Format documentation
Packaging Angular Libraries - Jason Aden at Angular Mountain View Meetup (Jan 2018, 45min talk)
Create and publish Angular libs like a Pro - Juri Strumpflohner at NG-BE (Dec 2017, 30min talk)
Packaging Angular - Jason Aden at ng-conf 2017 (28min talk)
Create 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)
General contribution guidelines
If 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.
To orchestrate the different tools, ng-packagr features a custom transformation pipeline. The transformation pipeline is built on top of RxJS and Angular Dependency Injection concepts.
6.6/10
Summary
OS Command Injection in ng-packagr
Affected Versions
< 10.1.1
Patched Versions
10.1.1
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
1 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 8
Details
Reason
Found 0/16 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More