
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
angular-compiler-components
Advanced tools
Angular compiler components é um projeto para compilar componentes em angular. Baseado no angular-library-builder
It's a CLI Tool to build Angular (2+) libraries ready to be published to npm.
At the moment there is no official documentation/guidelines on how to build and publish Angular (2+) components/libraries/services/modules to npm. Angular Library Builder (nglb) is trying to solve this in the easiest way possible.
templateUrl
with template
stylesUrls
with styles
. It uses:
*.d.ts
, *.js
, *.js.map
, *.metadata.json
filesangular-compiler-components
commandnpm install --save-dev angular-compiler-components
angular-compiler-components
?Add angular-compiler-components (nglb) script, main and types to package.json
:
"main": "./lib-dist/your-main-file.js",
"types": "./lib-dist/your-main-file.d.ts",
"scripts": {
"build:library": "nglb --rootDir src/lib --outDir lib-dist"
}
or
"main": "./lib-dist/your-main-file.js",
"types": "./lib-dist/your-main-file.d.ts",
"scripts": {
"build:library": "angular-compiler-components --rootDir src/lib --outDir lib-dist"
}
Now, in your project root:
npm run build:library
Congratulations! Your library is available in lib-dist folder ready to be published to npm.
To publish your new library to npm, execute the following command in your project root:
npm publish
angular-compiler-components
supportsoption (argument) | description |
---|---|
--rootDir | Specifies the root directory of input files. Example: nglb --rootDir src , [required] |
--outDir | Redirect output structure to the directory. Example: nglb --outDir dist , [required] |
--tsconfig | Possibility to extend/override properties in default tsconfig-ngc.json. Example: nglb --tsconfig path/to/your/override-tsconfig-ngc.json |
--help (-h) | Print help message |
angular-compiler-components
tsconfig-ngc.json default properties?Sometimes the defaults aren't good enough for everybody.
Let's imagine that you want to change slightly the build process:
To acomplish this create a file called, for example, override-tsconfig-ngc.json
in your project root.
Your override-tsconfig-ngc.json
file can be something like:
{
"compilerOptions": {
"target": "es2015",
"noImplicitAny": true
}
}
Then, you invoke nglb like this:
nglb --rootDir path/to/your/source --outDir path/to/dist --tsconfig override-tsconfig-ngc.json
@bmvantunes (Bruno Antunes, author)
Special thanks to gulp-inline-ng2-template. Without gulp-inline-ng2-template angular-compiler-components
would not be possible!
The repository code is open-sourced software licensed under the MIT license.
FAQs
Projeto para compilar componentes angulares
The npm package angular-compiler-components receives a total of 4 weekly downloads. As such, angular-compiler-components popularity was classified as not popular.
We found that angular-compiler-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.