Skip to content

Commit 56cf3f7

Browse files
authored
Merge pull request #90 from chrum/post-12
chore(): updating to latest angular builder
2 parents 3993180 + f81d1ca commit 56cf3f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+19359
-10625
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/tmp
66
/out-tsc
77
/.ng_pkg_build
8+
.angular
89

910
# dependencies
1011
/node_modules

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ It adjusts the textarea height automatically to any text input, or changes to th
1212
Check the demo [here](https://chrum.it/pages/ngx-autosize)
1313

1414
## Installation:
15-
15+
**angular 12+**
1616
```bash
1717
npm install ngx-autosize
1818
```
1919

20+
**for angular <12**
21+
```bash
22+
npm install ngx-autosize@1
23+
```
24+
2025
## Use Example:
2126

2227
Add the declaration to your @NgModule:

angular.json

+94-123
Original file line numberDiff line numberDiff line change
@@ -1,174 +1,145 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": false
5+
},
36
"version": 1,
47
"newProjectRoot": "projects",
58
"projects": {
6-
"ngx-autosize-app": {
7-
"root": "",
8-
"sourceRoot": "src",
9+
"ngx-autosize": {
10+
"projectType": "library",
11+
"root": "projects/ngx-autosize",
12+
"sourceRoot": "projects/ngx-autosize/src",
13+
"prefix": "lib",
14+
"architect": {
15+
"build": {
16+
"builder": "@angular-devkit/build-angular:ng-packagr",
17+
"options": {
18+
"project": "projects/ngx-autosize/ng-package.json"
19+
},
20+
"configurations": {
21+
"production": {
22+
"tsConfig": "projects/ngx-autosize/tsconfig.lib.prod.json"
23+
},
24+
"development": {
25+
"tsConfig": "projects/ngx-autosize/tsconfig.lib.json"
26+
}
27+
},
28+
"defaultConfiguration": "production"
29+
},
30+
"test": {
31+
"builder": "@angular-devkit/build-angular:karma",
32+
"options": {
33+
"main": "projects/ngx-autosize/src/test.ts",
34+
"tsConfig": "projects/ngx-autosize/tsconfig.spec.json",
35+
"karmaConfig": "projects/ngx-autosize/karma.conf.js"
36+
}
37+
}
38+
}
39+
},
40+
"ngx-autosize-demo": {
941
"projectType": "application",
10-
"prefix": "app",
1142
"schematics": {
1243
"@schematics/angular:component": {
13-
"styleext": "scss"
44+
"style": "scss"
45+
},
46+
"@schematics/angular:application": {
47+
"strict": true
1448
}
1549
},
50+
"root": "projects/ngx-autosize-demo",
51+
"sourceRoot": "projects/ngx-autosize-demo/src",
52+
"prefix": "app",
1653
"architect": {
1754
"build": {
1855
"builder": "@angular-devkit/build-angular:browser",
1956
"options": {
20-
"outputPath": "dist/ngx-autosize-app",
21-
"index": "src/index.html",
22-
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
24-
"tsConfig": "src/tsconfig.app.json",
57+
"outputPath": "dist/ngx-autosize-demo",
58+
"index": "projects/ngx-autosize-demo/src/index.html",
59+
"main": "projects/ngx-autosize-demo/src/main.ts",
60+
"polyfills": "projects/ngx-autosize-demo/src/polyfills.ts",
61+
"tsConfig": "projects/ngx-autosize-demo/tsconfig.app.json",
62+
"inlineStyleLanguage": "scss",
2563
"assets": [
26-
"src/favicon.ico",
27-
"src/assets"
64+
"projects/ngx-autosize-demo/src/favicon.ico",
65+
"projects/ngx-autosize-demo/src/assets"
2866
],
2967
"styles": [
30-
"src/styles.scss"
68+
"projects/ngx-autosize-demo/src/styles.scss"
3169
],
3270
"scripts": []
3371
},
3472
"configurations": {
3573
"production": {
36-
"fileReplacements": [
74+
"budgets": [
3775
{
38-
"replace": "src/environments/environment.ts",
39-
"with": "src/environments/environment.prod.ts"
76+
"type": "initial",
77+
"maximumWarning": "500kb",
78+
"maximumError": "1mb"
79+
},
80+
{
81+
"type": "anyComponentStyle",
82+
"maximumWarning": "2kb",
83+
"maximumError": "4kb"
4084
}
4185
],
42-
"optimization": true,
43-
"outputHashing": "all",
44-
"sourceMap": false,
45-
"extractCss": true,
46-
"namedChunks": false,
47-
"aot": true,
48-
"extractLicenses": true,
49-
"vendorChunk": false,
50-
"buildOptimizer": true,
51-
"budgets": [
86+
"fileReplacements": [
5287
{
53-
"type": "initial",
54-
"maximumWarning": "2mb",
55-
"maximumError": "5mb"
88+
"replace": "projects/ngx-autosize-demo/src/environments/environment.ts",
89+
"with": "projects/ngx-autosize-demo/src/environments/environment.prod.ts"
5690
}
57-
]
91+
],
92+
"outputHashing": "all"
93+
},
94+
"development": {
95+
"buildOptimizer": false,
96+
"optimization": false,
97+
"vendorChunk": true,
98+
"extractLicenses": false,
99+
"sourceMap": true,
100+
"namedChunks": true
58101
}
59-
}
102+
},
103+
"defaultConfiguration": "production"
60104
},
61105
"serve": {
62106
"builder": "@angular-devkit/build-angular:dev-server",
63-
"options": {
64-
"browserTarget": "ngx-autosize-app:build"
65-
},
66107
"configurations": {
67108
"production": {
68-
"browserTarget": "ngx-autosize-app:build:production"
109+
"browserTarget": "ngx-autosize-demo:build:production"
110+
},
111+
"development": {
112+
"browserTarget": "ngx-autosize-demo:build:development"
69113
}
70-
}
114+
},
115+
"defaultConfiguration": "development"
71116
},
72117
"extract-i18n": {
73118
"builder": "@angular-devkit/build-angular:extract-i18n",
74119
"options": {
75-
"browserTarget": "ngx-autosize-app:build"
120+
"browserTarget": "ngx-autosize-demo:build"
76121
}
77122
},
78123
"test": {
79124
"builder": "@angular-devkit/build-angular:karma",
80125
"options": {
81-
"main": "src/test.ts",
82-
"polyfills": "src/polyfills.ts",
83-
"tsConfig": "src/tsconfig.spec.json",
84-
"karmaConfig": "src/karma.conf.js",
85-
"styles": [
86-
"src/styles.scss"
87-
],
88-
"scripts": [],
126+
"main": "projects/ngx-autosize-demo/src/test.ts",
127+
"polyfills": "projects/ngx-autosize-demo/src/polyfills.ts",
128+
"tsConfig": "projects/ngx-autosize-demo/tsconfig.spec.json",
129+
"karmaConfig": "projects/ngx-autosize-demo/karma.conf.js",
130+
"inlineStyleLanguage": "scss",
89131
"assets": [
90-
"src/favicon.ico",
91-
"src/assets"
92-
]
93-
}
94-
},
95-
"lint": {
96-
"builder": "@angular-devkit/build-angular:tslint",
97-
"options": {
98-
"tsConfig": [
99-
"src/tsconfig.app.json",
100-
"src/tsconfig.spec.json"
132+
"projects/ngx-autosize-demo/src/favicon.ico",
133+
"projects/ngx-autosize-demo/src/assets"
101134
],
102-
"exclude": [
103-
"**/node_modules/**"
104-
]
105-
}
106-
}
107-
}
108-
},
109-
"ngx-autosize-app-e2e": {
110-
"root": "e2e/",
111-
"projectType": "application",
112-
"prefix": "",
113-
"architect": {
114-
"e2e": {
115-
"builder": "@angular-devkit/build-angular:protractor",
116-
"options": {
117-
"protractorConfig": "e2e/protractor.conf.js",
118-
"devServerTarget": "ngx-autosize-app:serve"
119-
},
120-
"configurations": {
121-
"production": {
122-
"devServerTarget": "ngx-autosize-app:serve:production"
123-
}
124-
}
125-
},
126-
"lint": {
127-
"builder": "@angular-devkit/build-angular:tslint",
128-
"options": {
129-
"tsConfig": "e2e/tsconfig.e2e.json",
130-
"exclude": [
131-
"**/node_modules/**"
132-
]
133-
}
134-
}
135-
}
136-
},
137-
"ngx-autosize": {
138-
"root": "projects/autosize",
139-
"sourceRoot": "projects/autosize/src",
140-
"projectType": "library",
141-
"prefix": "ngx",
142-
"architect": {
143-
"build": {
144-
"builder": "@angular-devkit/build-ng-packagr:build",
145-
"options": {
146-
"tsConfig": "projects/autosize/tsconfig.lib.json",
147-
"project": "projects/autosize/ng-package.json"
148-
}
149-
},
150-
"test": {
151-
"builder": "@angular-devkit/build-angular:karma",
152-
"options": {
153-
"main": "projects/autosize/src/test.ts",
154-
"tsConfig": "projects/autosize/tsconfig.spec.json",
155-
"karmaConfig": "projects/autosize/karma.conf.js"
156-
}
157-
},
158-
"lint": {
159-
"builder": "@angular-devkit/build-angular:tslint",
160-
"options": {
161-
"tsConfig": [
162-
"projects/autosize/tsconfig.lib.json",
163-
"projects/autosize/tsconfig.spec.json"
135+
"styles": [
136+
"projects/ngx-autosize-demo/src/styles.scss"
164137
],
165-
"exclude": [
166-
"**/node_modules/**"
167-
]
138+
"scripts": []
168139
}
169140
}
170141
}
171142
}
172143
},
173-
"defaultProject": "ngx-autosize-app"
174-
}
144+
"defaultProject": "ngx-autosize-demo"
145+
}

browserslist

-11
This file was deleted.

e2e/protractor.conf.js

-28
This file was deleted.

e2e/src/app.e2e-spec.ts

-14
This file was deleted.

e2e/src/app.po.ts

-11
This file was deleted.

e2e/tsconfig.e2e.json

-13
This file was deleted.

0 commit comments

Comments
 (0)