Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@angular/compiler-cli
Advanced tools
The @angular/compiler-cli package provides command-line interfaces to perform Angular compilations. It is primarily used to compile Angular applications into JavaScript code that can be executed by browsers. It leverages the Angular Compiler (ngc) which is a superset of the TypeScript compiler (tsc) and includes Angular-specific metadata processing.
Ahead-of-Time (AOT) Compilation
Compiles Angular HTML and TypeScript code into efficient JavaScript code during the build process before the browser downloads and runs that code. This is the main feature of the compiler-cli which results in faster rendering, fewer asynchronous requests, smaller Angular framework download size, and better security.
ngc -p tsconfig.app.json
Incremental Builds
Supports incremental compilation by reusing the previous compilation results to speed up subsequent compilations. This feature is useful for large projects to reduce build times.
ngc --incremental
Link Time Code Generation
Processes libraries to generate Ivy-compatible code as part of the Angular Ivy compilation pipeline. This feature is used when compiling libraries with the Ivy renderer.
ngc --create-ivy-entry-points
The TypeScript compiler is similar to @angular/compiler-cli in that it compiles TypeScript code to JavaScript. However, it does not have Angular-specific metadata processing capabilities and is not tailored for Angular applications.
Babel is a JavaScript compiler that can transform syntax, polyfill features that are missing in your target environment, and more. While it is not specific to Angular, it is often used in the JavaScript ecosystem for compiling next-generation JavaScript code down to a form that can be executed in current browsers.
Webpack is a module bundler that can also perform various optimizations and transformations on your code, including compiling TypeScript with the appropriate loader. It is more general-purpose compared to @angular/compiler-cli and is used in a wide variety of JavaScript applications, not just Angular.
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
License: MIT
FAQs
Angular - the compiler CLI for Node.js
The npm package @angular/compiler-cli receives a total of 2,103,142 weekly downloads. As such, @angular/compiler-cli popularity was classified as popular.
We found that @angular/compiler-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.