Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
angular-compiler-components
Advanced tools
Readme
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
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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).