Skip to content
This repository was archived by the owner on Jul 13, 2022. It is now read-only.

Commit e4892f1

Browse files
committed
chore: update to Angular 12
1 parent 690a597 commit e4892f1

36 files changed

+277
-318
lines changed

.eslintrc.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": [
4+
"projects/**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"tsconfig.json"
14+
],
15+
"createDefaultProgram": true
16+
},
17+
"extends": [
18+
"plugin:@angular-eslint/recommended",
19+
"plugin:@angular-eslint/template/process-inline-templates"
20+
],
21+
"rules": {
22+
"@angular-eslint/directive-selector": [
23+
"error",
24+
{
25+
"type": "attribute",
26+
"prefix": "app",
27+
"style": "camelCase"
28+
}
29+
],
30+
"@angular-eslint/component-selector": [
31+
"error",
32+
{
33+
"type": "element",
34+
"prefix": "app",
35+
"style": "kebab-case"
36+
}
37+
],
38+
"@angular-eslint/no-conflicting-lifecycle": "off"
39+
}
40+
},
41+
{
42+
"files": [
43+
"*.html"
44+
],
45+
"extends": [
46+
"plugin:@angular-eslint/template/recommended"
47+
],
48+
"rules": {}
49+
}
50+
]
51+
}

NG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# CoreuiIconsAngular
1+
# CoreuiIconsAngular12
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.3.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.5.
44

55
## Development server
66

@@ -12,15 +12,15 @@ Run `ng generate component component-name` to generate a new component. You can
1212

1313
## Build
1414

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
1616

1717
## Running unit tests
1818

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

2121
## Running end-to-end tests
2222

23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23+
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.
2424

2525
## Further help
2626

NG12.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CoreuiIconsAngular
2+
3+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
4+
5+
## Code scaffolding
6+
7+
Run `ng generate component component-name --project coreui-icons-angular` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project coreui-icons-angular`.
8+
> Note: Don't forget to add `--project coreui-icons-angular` or else it will be added to the default project in your `angular.json` file.
9+
10+
## Build
11+
12+
Run `ng build coreui-icons-angular` to build the project. The build artifacts will be stored in the `dist/` directory.
13+
14+
## Publishing
15+
16+
After building your library with `ng build coreui-icons-angular`, go to the dist folder `cd dist/coreui-icons-angular` and run `npm publish`.
17+
18+
## Running unit tests
19+
20+
Run `ng test coreui-icons-angular` to execute the unit tests via [Karma](https://karma-runner.github.io).
21+
22+
## Further help
23+
24+
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.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![NPM](https://img.shields.io/npm/v/@coreui/icons-angular/latest?style=flat-square&color=brightgreen)][coreui-angular-icons-npm]
44
[![Downloads](https://img.shields.io/npm/dm/@coreui/icons-angular.svg?style=flat-square)][coreui-angular-icons-npm]
55
[![License](https://img.shields.io/npm/l/@coreui/angular?style=flat-square)][coreui]
6-
![angular](https://img.shields.io/badge/angular-^11.0.0-lightgrey.svg?style=flat-square&logo=angular)
6+
![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular)
77

88
[coreui]: https://coreui.io/icons
99
[coreui-angular-icons-npm]: https://www.npmjs.com/package/@coreui/icons-angular
@@ -85,8 +85,8 @@ proprerty | type | default | description
8585
`customClasses` | string | undefined | Overwrites default `c-icon` component classes
8686
`viewBox` | string | undefined | SVG `viewbox`
8787
`attributes` | any | `{ role: 'img' }` | Object with additional html attributes
88-
`width` | | undefined | SVG `width`
89-
`height` | | undefined | SVG `height`
88+
`width` | string | undefined | SVG `width`
89+
`height` | string | undefined | SVG `height`
9090
9191
---
9292

angular.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"cli": {
4-
"analytics": false
4+
"analytics": false,
5+
"defaultCollection": "@angular-eslint/schematics"
56
},
67
"version": 1,
78
"newProjectRoot": "projects",
@@ -13,39 +14,39 @@
1314
"style": "scss"
1415
}
1516
},
16-
"root": "projects/coreui/icons-angular",
17-
"sourceRoot": "projects/coreui/icons-angular/src",
17+
"root": "projects/coreui-icons-angular",
18+
"sourceRoot": "projects/coreui-icons-angular/src",
1819
"prefix": "c",
1920
"architect": {
2021
"build": {
2122
"builder": "@angular-devkit/build-angular:ng-packagr",
2223
"options": {
23-
"tsConfig": "projects/coreui/icons-angular/tsconfig.lib.json",
24-
"project": "projects/coreui/icons-angular/ng-package.json"
24+
"project": "projects/coreui-icons-angular/ng-package.json"
2525
},
2626
"configurations": {
2727
"production": {
28-
"tsConfig": "projects/coreui/icons-angular/tsconfig.lib.prod.json"
28+
"tsConfig": "projects/coreui-icons-angular/tsconfig.lib.prod.json"
29+
},
30+
"development": {
31+
"tsConfig": "projects/coreui-icons-angular/tsconfig.lib.json"
2932
}
30-
}
33+
},
34+
"defaultConfiguration": "production"
3135
},
3236
"test": {
3337
"builder": "@angular-devkit/build-angular:karma",
3438
"options": {
35-
"main": "projects/coreui/icons-angular/src/test.ts",
36-
"tsConfig": "projects/coreui/icons-angular/tsconfig.spec.json",
37-
"karmaConfig": "projects/coreui/icons-angular/karma.conf.js"
39+
"main": "projects/coreui-icons-angular/src/test.ts",
40+
"tsConfig": "projects/coreui-icons-angular/tsconfig.spec.json",
41+
"karmaConfig": "projects/coreui-icons-angular/karma.conf.js"
3842
}
3943
},
4044
"lint": {
41-
"builder": "@angular-devkit/build-angular:tslint",
45+
"builder": "@angular-eslint/builder:lint",
4246
"options": {
43-
"tsConfig": [
44-
"projects/coreui/icons-angular/tsconfig.lib.json",
45-
"projects/coreui/icons-angular/tsconfig.spec.json"
46-
],
47-
"exclude": [
48-
"**/node_modules/**"
47+
"lintFilePatterns": [
48+
"projects/coreui-icons-angular/**/*.ts",
49+
"projects/coreui-icons-angular/**/*.html"
4950
]
5051
}
5152
}

package.json

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coreui-icons-angular",
3-
"version": "1.0.0-alpha.4",
3+
"version": "2.0.0-alpha.0",
44
"description": "CoreUI Icons Angular component",
55
"license": "MIT",
66
"homepage": "https://coreui.io",
@@ -27,45 +27,49 @@
2727
"ng": "ng",
2828
"start": "ng serve",
2929
"build": "ng build",
30-
"watch": "ng build --watch",
30+
"watch": "ng build --watch --configuration development",
3131
"test": "ng test",
32-
"test:github": "ng test --karma-config=projects/coreui/icons-angular/karma.conf.github.js",
32+
"test:github": "ng test --karma-config=projects/coreui-icons-angular/karma.conf.github.js",
3333
"lint": "ng lint",
34-
"link-lib": "cd dist/coreui-icons-angular/ && npm link",
35-
"publish-lib": "cd dist/coreui-icons-angular/ && npm publish --tag next --dry-run",
34+
"link:lib": "cd dist/coreui-icons-angular/ && npm link",
35+
"prepublish:lib": "ng lint && ng test --watch=false && ng build",
36+
"publish:lib": "cd dist/coreui-icons-angular/ && npm publish --tag next --dry-run",
3637
"e2e": "ng e2e"
3738
},
3839
"private": true,
3940
"dependencies": {
40-
"@angular/common": "~11.2.7",
41-
"@angular/compiler": "~11.2.7",
42-
"@angular/core": "~11.2.7",
43-
"@angular/platform-browser": "~11.2.7",
44-
"@angular/platform-browser-dynamic": "~11.2.7",
45-
"rxjs": "~6.6.7",
46-
"tslib": "^2.0.0",
47-
"zone.js": "~0.11.3"
41+
"@angular/common": "~12.2.0",
42+
"@angular/compiler": "~12.2.0",
43+
"@angular/core": "~12.2.0",
44+
"@angular/platform-browser": "~12.2.0",
45+
"@angular/platform-browser-dynamic": "~12.2.0",
46+
"rxjs": "~6.6.0",
47+
"tslib": "^2.3.0",
48+
"zone.js": "~0.11.4"
4849
},
4950
"devDependencies": {
50-
"@angular-devkit/build-angular": "~0.1102.6",
51-
"@angular/cli": "~11.2.6",
52-
"@angular/compiler-cli": "~11.2.7",
51+
"@angular-devkit/build-angular": "~12.2.5",
52+
"@angular-eslint/builder": "12.4.1",
53+
"@angular-eslint/eslint-plugin": "12.4.1",
54+
"@angular-eslint/eslint-plugin-template": "12.4.1",
55+
"@angular-eslint/schematics": "12.4.1",
56+
"@angular-eslint/template-parser": "12.4.1",
57+
"@angular/cli": "~12.2.5",
58+
"@angular/compiler-cli": "~12.2.0",
5359
"@coreui/icons": "^2.0.1",
54-
"@types/jasmine": "~3.6.9",
55-
"@types/node": "^14.14.37",
56-
"codelyzer": "^6.0.1",
57-
"jasmine-core": "~3.7.1",
58-
"jasmine-spec-reporter": "^6.0.0",
59-
"karma": "~6.3.2",
60+
"@types/jasmine": "~3.8.0",
61+
"@types/node": "^12.11.1",
62+
"@typescript-eslint/eslint-plugin": "4.28.2",
63+
"@typescript-eslint/parser": "4.28.2",
64+
"eslint": "^7.26.0",
65+
"jasmine-core": "~3.8.0",
66+
"karma": "~6.3.0",
6067
"karma-chrome-launcher": "~3.1.0",
6168
"karma-coverage": "~2.0.3",
62-
"karma-jasmine": "~4.0.1",
63-
"karma-jasmine-html-reporter": "^1.5.4",
64-
"ng-packagr": "^11.2.4",
65-
"protractor": "~7.0.0",
66-
"ts-node": "~8.3.0",
67-
"tslint": "~6.1.3",
68-
"typescript": "~4.1.5"
69+
"karma-jasmine": "~4.0.0",
70+
"karma-jasmine-html-reporter": "~1.7.0",
71+
"ng-packagr": "^12.1.1",
72+
"typescript": "~4.3.5"
6973
},
7074
"keywords": [
7175
"coreui",
@@ -79,7 +83,7 @@
7983
"angular"
8084
],
8185
"engines": {
82-
"node": ">= 10.13",
86+
"node": ">= 12.10",
8387
"npm": ">= 6"
8488
}
8589
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"extends": "../../.eslintrc.json",
3+
"ignorePatterns": [
4+
"!**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"projects/coreui-icons-angular/tsconfig.lib.json",
14+
"projects/coreui-icons-angular/tsconfig.spec.json"
15+
],
16+
"createDefaultProgram": true
17+
},
18+
"rules": {
19+
"@angular-eslint/directive-selector": [
20+
"error",
21+
{
22+
"type": "attribute",
23+
"prefix": "c",
24+
"style": "camelCase"
25+
}
26+
],
27+
"@angular-eslint/component-selector": [
28+
"error",
29+
{
30+
"type": "element",
31+
"prefix": "c",
32+
"style": "kebab-case"
33+
}
34+
]
35+
}
36+
},
37+
{
38+
"files": [
39+
"*.html"
40+
],
41+
"rules": {}
42+
}
43+
]
44+
}

projects/coreui/icons-angular/README.md renamed to projects/coreui-icons-angular/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![NPM](https://img.shields.io/npm/v/@coreui/icons-angular/latest?style=flat-square&color=brightgreen)][coreui-angular-icons-npm]
44
[![Downloads](https://img.shields.io/npm/dm/@coreui/icons-angular.svg?style=flat-square)][coreui-angular-icons-npm]
55
[![License](https://img.shields.io/npm/l/@coreui/angular?style=flat-square)][coreui]
6-
![angular](https://img.shields.io/badge/angular-^11.0.0-lightgrey.svg?style=flat-square&logo=angular)
6+
![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular)
77

88
[coreui]: https://coreui.io/icons
99
[coreui-angular-icons-npm]: https://www.npmjs.com/package/@coreui/icons-angular

projects/coreui/icons-angular/karma.conf.github.js renamed to projects/coreui-icons-angular/karma.conf.github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (config) {
2525
suppressAll: true // removes the duplicated traces
2626
},
2727
coverageReporter: {
28-
dir: require('path').join(__dirname, '../../../coverage/coreui-icons-angular'),
28+
dir: require('path').join(__dirname, '../../coverage/coreui-icons-angular'),
2929
subdir: '.',
3030
reporters: [
3131
{ type: 'html' },

projects/coreui/icons-angular/karma.conf.js renamed to projects/coreui-icons-angular/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (config) {
2525
suppressAll: true // removes the duplicated traces
2626
},
2727
coverageReporter: {
28-
dir: require('path').join(__dirname, '../../../coverage/coreui-icons-angular'),
28+
dir: require('path').join(__dirname, '../../coverage/coreui-icons-angular'),
2929
subdir: '.',
3030
reporters: [
3131
{ type: 'html' },
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../dist/coreui-icons-angular",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
},
7+
"allowedNonPeerDependencies": [
8+
"."
9+
]
10+
}
11+
}

projects/coreui/icons-angular/package.json renamed to projects/coreui-icons-angular/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/icons-angular",
3-
"version": "1.0.0-alpha.4",
3+
"version": "2.0.0-alpha.0",
44
"description": "CoreUI Icons Angular component and service",
55
"copyright": "Copyright 2021 creativeLabs Łukasz Holeczek",
66
"license": "MIT",
@@ -25,11 +25,11 @@
2525
"url": "https://github.com/coreui/coreui-icons-angular/issues"
2626
},
2727
"peerDependencies": {
28-
"@angular/common": ">= 9.1.x",
29-
"@angular/core": ">= 9.1.x"
28+
"@angular/common": "^12.2.0",
29+
"@angular/core": "^12.2.0"
3030
},
3131
"dependencies": {
32-
"tslib": "^2.0.0"
32+
"tslib": "^2.3.0"
3333
},
3434
"keywords": [
3535
"coreui",

0 commit comments

Comments
 (0)