Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for different Angular versions #67

Closed
wants to merge 9 commits into from
27 changes: 27 additions & 0 deletions components/confetti/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,35 @@ This project was generated with [Angular CLI](https://github.com/angular/angular

## Development server

### Angular 10
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

### Angular 11
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

### Angular 12
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
Expand Down
160 changes: 134 additions & 26 deletions components/confetti/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,144 @@
"analytics": "5b6759b4-0ecf-4977-b1c2-76d9fcfbdc05"
},
"newProjectRoot": "projects",
"projects": {
"ng-confetti": {
"projectType": "library",
"root": "projects/ng-confetti",
"sourceRoot": "projects/ng-confetti/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/ng-confetti/ng-package.json"
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "pnpm",
"analytics": "5b6759b4-0ecf-4977-b1c2-76d9fcfbdc05"
},
"newProjectRoot": "projects",
"projects": {
"ng-confetti": {
"projectType": "library",
"root": "projects/ng-confetti",
"sourceRoot": "projects/ng-confetti/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/ng-confetti/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ng-confetti/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/ng-confetti/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"configurations": {
"production": {
"tsConfig": "projects/ng-confetti/tsconfig.lib.prod.json"
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "projects/ng-confetti/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
},
"angular-10": {
"projectType": "library",
"root": "components/confetti/projects/angular-10",
"sourceRoot": "components/confetti/projects/angular-10/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "components/confetti/projects/angular-10/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "components/confetti/projects/angular-10/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "components/confetti/projects/angular-10/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "components/confetti/projects/angular-10/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
},
"angular-11": {
"projectType": "library",
"root": "components/confetti/projects/angular-11",
"sourceRoot": "components/confetti/projects/angular-11/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "components/confetti/projects/angular-11/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "components/confetti/projects/angular-11/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "components/confetti/projects/angular-11/tsconfig.lib.json"
}
},
"development": {
"tsConfig": "projects/ng-confetti/tsconfig.lib.json"
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "components/confetti/projects/angular-11/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
},
"angular-12": {
"projectType": "library",
"root": "components/confetti/projects/angular-12",
"sourceRoot": "components/confetti/projects/angular-12/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "components/confetti/projects/angular-12/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "components/confetti/projects/angular-12/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "components/confetti/projects/angular-12/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "projects/ng-confetti/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "components/confetti/projects/angular-12/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
}
Expand Down
42 changes: 42 additions & 0 deletions components/confetti/projects/angular-10/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "angular-10",
"version": "1.0.0",
"dependencies": {
"@angular/common": "^10.0.0",
"@angular/compiler": "^10.0.0",
"@angular/core": "^10.0.0",
"@angular/forms": "^10.0.0",
"@angular/platform-browser": "^10.0.0",
"@angular/platform-browser-dynamic": "^10.0.0",
"rxjs": "^6.6.0",
"zone.js": "^0.10.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^10.0.0",
"@angular/cli": "^10.0.0",
"@angular/compiler-cli": "^10.0.0",
"@types/jasmine": "^3.6.0",
"@types/node": "^14.0.0",
"codelyzer": "^6.0.0",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^5.0.0",
"karma": "^5.0.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.0",
"karma-jasmine": "^4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "^7.0.0",
"ts-node": "^8.0.0",
"tslint": "^6.0.0",
"typescript": "~3.9.5"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-angular-10-demo',
templateUrl: './angular-10-demo.component.html',
styleUrls: ['./angular-10-demo.component.css']
})
export class Angular10DemoComponent {
// Define properties and methods to showcase compatibility with Angular 10
}
42 changes: 42 additions & 0 deletions components/confetti/projects/angular-11/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "angular-11",
"version": "1.0.0",
"dependencies": {
"@angular/common": "^11.0.0",
"@angular/compiler": "^11.0.0",
"@angular/core": "^11.0.0",
"@angular/forms": "^11.0.0",
"@angular/platform-browser": "^11.0.0",
"@angular/platform-browser-dynamic": "^11.0.0",
"rxjs": "^6.6.0",
"zone.js": "^0.11.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^11.0.0",
"@angular/cli": "^11.0.0",
"@angular/compiler-cli": "^11.0.0",
"@types/jasmine": "^3.6.0",
"@types/node": "^14.0.0",
"codelyzer": "^6.0.0",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^5.0.0",
"karma": "^5.0.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.0",
"karma-jasmine": "^4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "^7.0.0",
"ts-node": "^8.0.0",
"tslint": "^6.0.0",
"typescript": "~4.0.0"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-angular-11-demo',
templateUrl: './angular-11-demo.component.html',
styleUrls: ['./angular-11-demo.component.css']
})
export class Angular11DemoComponent {
// Define properties and methods to showcase compatibility with Angular 11
}
42 changes: 42 additions & 0 deletions components/confetti/projects/angular-12/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "angular-12",
"version": "1.0.0",
"dependencies": {
"@angular/common": "^12.0.0",
"@angular/compiler": "^12.0.0",
"@angular/core": "^12.0.0",
"@angular/forms": "^12.0.0",
"@angular/platform-browser": "^12.0.0",
"@angular/platform-browser-dynamic": "^12.0.0",
"rxjs": "^6.6.0",
"zone.js": "^0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^12.0.0",
"@angular/cli": "^12.0.0",
"@angular/compiler-cli": "^12.0.0",
"@types/jasmine": "^3.6.0",
"@types/node": "^14.0.0",
"codelyzer": "^6.0.0",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^5.0.0",
"karma": "^5.0.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.0",
"karma-jasmine": "^4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "^7.0.0",
"ts-node": "^8.0.0",
"tslint": "^6.0.0",
"typescript": "~4.2.0"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-angular-12-demo',
templateUrl: './angular-12-demo.component.html',
styleUrls: ['./angular-12-demo.component.css']
})
export class Angular12DemoComponent {
// Define properties and methods to showcase compatibility with Angular 12
}
Loading