Skip to content

Commit

Permalink
chore: support ivy based partial compilation for @ngqp/core
Browse files Browse the repository at this point in the history
closes #224
  • Loading branch information
pumano committed Nov 4, 2022
1 parent 5c904c2 commit 979f038
Show file tree
Hide file tree
Showing 9 changed files with 5,216 additions and 6,068 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/tmp
/out-tsc

# angular cache
.angular/cache

# dependencies
node_modules

Expand Down
47 changes: 27 additions & 20 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/ngqp/core/tsconfig.lib.json",
"project": "projects/ngqp/core/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ngqp/core/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/ngqp/core/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
Expand All @@ -36,9 +39,7 @@
"projects/ngqp/core/tsconfig.lib.json",
"projects/ngqp/core/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
"exclude": ["**/node_modules/**"]
}
}
}
Expand All @@ -64,9 +65,7 @@
"projects/ngqp-demo/src/assets",
"projects/ngqp-demo/src/manifest.json"
],
"styles": [
"projects/ngqp-demo/src/styles.scss"
],
"styles": ["projects/ngqp-demo/src/styles.scss"],
"scripts": []
},
"configurations": {
Expand All @@ -79,12 +78,6 @@
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -97,8 +90,17 @@
}
],
"serviceWorker": true
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand All @@ -108,8 +110,12 @@
"configurations": {
"production": {
"browserTarget": "ngqp-demo:build:production"
},
"development": {
"browserTarget": "ngqp-demo:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -120,9 +126,7 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ngqp-demo/tsconfig.app.json"
],
"tsConfig": ["projects/ngqp-demo/tsconfig.app.json"],
"exclude": [
"**/node_modules/**",
"**/*.example.html",
Expand All @@ -138,5 +142,8 @@
"@schematics/angular:component": {
"style": "scss"
}
},
"cli": {
"analytics": false
}
}
}
58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"lint": "ng lint",
"serve": "yarn demo:serve",
"codecov": "codecov",
"core:build": "ng build @ngqp/core",
"core:build:prod": "ng build @ngqp/core --prod",
"core:build": "ng build @ngqp/core --configuration=development",
"core:build:prod": "ng build @ngqp/core",
"core:test": "ng test @ngqp/core --code-coverage --source-map=true --progress=false --watch=false",
"core:test:watch": "ng test @ngqp/core --watch=true",
"core:release:prepare": "scripts/prepare-release.sh",
"core:release:publish": "yarn core:release:prepare && scripts/publish-release.sh",
"demo:build": "ng build ngqp-demo",
"demo:build:prod": "yarn demo:build --prod",
"demo:build": "ng build ngqp-demo --configuration=development",
"demo:build:prod": "yarn demo:build",
"demo:release:prepare": "yarn core:build:prod && yarn demo:build:prod --base-href=\"https://www.ngqp.io\" && yarn api-docs:build",
"demo:release:publish": "yarn demo:release:prepare && npx ngh --dir=dist/ngqp-demo --cname=\"www.ngqp.io\"",
"demo:serve": "ng serve ngqp-demo",
Expand All @@ -29,44 +29,44 @@
}
},
"dependencies": {
"@angular/animations": "~11.0.7",
"@angular/common": "~11.0.7",
"@angular/compiler": "~11.0.7",
"@angular/core": "~11.0.7",
"@angular/forms": "~11.0.7",
"@angular/platform-browser": "~11.0.7",
"@angular/platform-browser-dynamic": "~11.0.7",
"@angular/router": "~11.0.7",
"@angular/service-worker": "~11.0.7",
"@angular/animations": "~14.0.0",
"@angular/common": "~14.0.0",
"@angular/compiler": "~14.0.0",
"@angular/core": "~14.0.0",
"@angular/forms": "~14.0.0",
"@angular/platform-browser": "~14.0.0",
"@angular/platform-browser-dynamic": "~14.0.0",
"@angular/router": "~14.0.0",
"@angular/service-worker": "~14.0.0",
"@fortawesome/angular-fontawesome": "^0.7.0",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-brands-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"add": "^2.0.6",
"bootstrap": "^4.5.3",
"core-js": "^3.6.5",
"core-js": "^3.26.0",
"prismjs": "^1.27.0",
"rxjs": "~6.6.3",
"tslib": "^2.0.0",
"yarn": "^1.22.10",
"zone.js": "~0.10.2"
"tslib": "^2.3.0",
"yarn": "^1.22.19",
"zone.js": "~0.11.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.6",
"@angular/cli": "~11.0.6",
"@angular/compiler-cli": "~11.0.7",
"@angular/language-service": "~11.0.7",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/travis-cli": "^11.0.0",
"@compodoc/compodoc": "^1.1.11",
"@angular-devkit/build-angular": "~14.0.0",
"@angular/cli": "~14.0.0",
"@angular/compiler-cli": "~14.0.0",
"@angular/language-service": "~14.0.0",
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@commitlint/travis-cli": "^17.2.0",
"@compodoc/compodoc": "^1.1.19",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^12.11.1",
"@types/prismjs": "^1.16.1",
"angular-cli-ghpages": "^0.6.2",
"codecov": "^3.8.0",
"angular-cli-ghpages": "^1.0.3",
"codecov": "^3.8.3",
"codelyzer": "^6.0.0",
"husky": "^4.3.0",
"jasmine-core": "~3.6.0",
Expand All @@ -76,11 +76,11 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.0.3",
"ng-packagr": "^14.0.0",
"protractor": "~7.0.0",
"standard-version": "^9.0.0",
"ts-node": "~9.0.0",
"tslint": "~6.1.0",
"typescript": "~4.0.3"
"typescript": "~4.7.4"
}
}
19 changes: 12 additions & 7 deletions projects/ngqp-demo/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed

> 0.5%
last 2 versions
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not dead
not IE 9-11
12 changes: 6 additions & 6 deletions projects/ngqp/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngqp/core",
"version": "14.1.0",
"version": "15.0.0",
"description": "Synchronizing form controls with the URL for Angular",
"homepage": "https://ngqp.io",
"author": "Ingo Bürk",
Expand All @@ -20,13 +20,13 @@
"reactive"
],
"dependencies": {
"tslib": "^2.0.0"
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/common": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/core": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/forms": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/router": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/common": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/core": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/forms": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"@angular/router": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"rxjs": "^6.0.0 || ^7.0.0"
}
}
4 changes: 2 additions & 2 deletions projects/ngqp/core/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declarationMap": true,
"target": "es2015",
"target": "es2020",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
Expand All @@ -22,7 +22,7 @@
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictTemplates": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
Expand Down
2 changes: 1 addition & 1 deletion projects/ngqp/core/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
Expand Down

0 comments on commit 979f038

Please sign in to comment.