Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/angular/ngcc-validation
Angular Ivy library compatibility validation project
https://github.com/angular/ngcc-validation
angular ivy ngcc
Last synced: about 1 month ago
JSON representation
Angular Ivy library compatibility validation project
- Host: GitHub
- URL: https://github.com/angular/ngcc-validation
- Owner: angular
- Archived: true
- Created: 2019-07-24T00:27:47.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T17:54:12.000Z (almost 2 years ago)
- Last Synced: 2024-09-26T11:04:30.520Z (about 2 months ago)
- Topics: angular, ivy, ngcc
- Language: TypeScript
- Homepage:
- Size: 44.3 MB
- Stars: 145
- Watchers: 5
- Forks: 44
- Open Issues: 135
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/angular/ngcc-validation.svg?style=svg)](https://circleci.com/gh/angular/ngcc-validation)
# ngcc validation
This repository aims to validate the Angular Ivy compatibility compiler (`ngcc`). Each directory contains a project that uses a popular Angular package which is distributed with `metadata.json` files generated by `ngc`.
Each library is imported inside `app.module.ts`. The CI runs `ng build` in each directory to validate that `ngcc` is able to compile the given package to Ivy compatible format.
## How to add my library?
To add your library, follow the next simple 4 steps:
**Clone the repository**:
```bash
git clone [email protected]:angular/ngcc-validation.git
```**Install the top-level dependencies**:
```bash
cd ngcc-validation
yarn install
```**Create your project**:
Inside of the root directory create a new project:
```bash
npm run add-project [my-library-name]
```This will create a new CLI application in `[my-library-name]-ngcc`:
* using the latest CLI
* with Ivy enabled**Import your library**:
In `app.module.ts` **add an import** of your library.
Ideally import the library's `NgModule` into the `AppModule`.For example:
```ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';import { AgGridModule } from 'ag-grid-angular';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AgGridModule.forRoot(),
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```## My library is there, should I add tests?
Yes! The above instructions will only validate that your application could be successfully compiled with `ngcc`. To validate it actually works, it'll be great to add unit or e2e tests.
## License
MIT