Skip to content

Commit

Permalink
feat: Angular 13 update
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Dec 10, 2021
1 parent 90d40e6 commit 49a3669
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 30 deletions.
1 change: 1 addition & 0 deletions generators/app/templates/_.gitignore
Expand Up @@ -44,6 +44,7 @@ xcuserdata/
/log

# Misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
7 changes: 7 additions & 0 deletions generators/app/templates/_angular.json
Expand Up @@ -8,6 +8,13 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
<% if (props.strict) { -%>
"strict": true
<% } else { -%>
"strict": false
<% } -%>
}
},
"root": "",
Expand Down
38 changes: 19 additions & 19 deletions generators/app/templates/_package.json
Expand Up @@ -69,17 +69,17 @@
"generate": "ng generate"
},
"dependencies": {
"@angular/animations": "^12.1.3",
"@angular/common": "^12.1.3",
"@angular/compiler": "^12.1.3",
"@angular/core": "^12.1.3",
"@angular/forms": "^12.1.3",
"@angular/animations": "^13.0.3",
"@angular/common": "^13.0.3",
"@angular/compiler": "^13.0.3",
"@angular/core": "^13.0.3",
"@angular/forms": "^13.0.3",
<% if (props.ui === 'bootstrap' || props.ui === 'material') { -%>
"@angular/localize": "^12.1.3",
"@angular/localize": "^13.0.3",
<% } -%>
"@angular/platform-browser": "^12.1.3",
"@angular/platform-browser-dynamic": "^12.1.3",
"@angular/router": "^12.1.3",
"@angular/platform-browser": "^13.0.3",
"@angular/platform-browser-dynamic": "^13.0.3",
"@angular/router": "^13.0.3",
"@ngx-translate/core": "^13.0.0",
<% if (props.target.includes('cordova')) { -%>
"@ionic-native/core": "^5.30.0",
Expand All @@ -97,7 +97,7 @@
"cordova-plugin-whitelist": "^1.3.4",
<% } -%>
<% if (props.pwa) { -%>
"@angular/service-worker": "^12.1.3",
"@angular/service-worker": "^13.0.3",
<% } -%>
<% if (props.ui === 'ionic') { -%>
"@ionic/angular": "^5.6.11",
Expand All @@ -106,8 +106,8 @@
"bootstrap": "^5.0.2",
"@fortawesome/fontawesome-free": "^5.15.1",
<% } else if (props.ui === 'material') { -%>
"@angular/cdk": "^12.1.3",
"@angular/material": "^12.1.3",
"@angular/cdk": "^13.0.3",
"@angular/material": "^13.0.3",
"@angular/flex-layout": "^12.0.0-beta.34",
"material-design-icons-iconfont": "^6.1.0",
<% } -%>
Expand All @@ -126,8 +126,8 @@
<% if (props.utility.includes('datefns')) { -%>
"date-fns": "^2.16.1",
<% } -%>
"rxjs": "^6.6.3",
"tslib": "^2.2.0",
"rxjs": "^7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
Expand All @@ -137,15 +137,15 @@
<% if (props.tools.includes('jest')) { -%>
"@angular-builders/jest": "^12.1.0",
<% } -%>
"@angular-devkit/build-angular": "~12.1.3",
"@angular-devkit/build-angular": "~13.0.3",
"@angular-eslint/builder": "~12.3.1",
"@angular-eslint/eslint-plugin": "~12.3.1",
"@angular-eslint/eslint-plugin-template": "~12.3.1",
"@angular-eslint/schematics": "~12.3.1",
"@angular-eslint/template-parser": "~12.3.1",
"@angular/cli": "~12.1.3",
"@angular/compiler-cli": "~12.1.3",
"@angular/language-service": "~12.1.3",
"@angular/cli": "~13.0.3",
"@angular/compiler-cli": "~13.0.3",
"@angular/language-service": "~13.0.3",
"@biesbjerg/ngx-translate-extract": "^7.0.3",
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
"@ngx-rocket/scripts": "^5.1.0",
Expand Down Expand Up @@ -221,7 +221,7 @@
"stylelint-config-standard": "~22.0.0",
"stylelint-scss": "~3.20.1",
"ts-node": "^10.1.0",
"typescript": "~4.3.2"
"typescript": "~4.4.3"
<% if (props.tools.includes('prettier')) { -%>
},
"prettier": {
Expand Down
5 changes: 4 additions & 1 deletion generators/app/templates/_tsconfig.json
Expand Up @@ -3,6 +3,8 @@
"compilerOptions": {
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
Expand All @@ -27,7 +29,7 @@
"node_modules/@types"
],
"lib": [
"es2018",
"es2020",
"dom"
],
"baseUrl": "./",
Expand All @@ -41,6 +43,7 @@
}
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
<% if (props.strict) { -%>
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/src/__tools-karma.test.ts
Expand Up @@ -3,7 +3,7 @@
* This file is required by karma.conf.js and loads recursively all the .spec and framework files.
*/

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down
7 changes: 0 additions & 7 deletions generators/app/templates/src/_polyfills.ts
Expand Up @@ -28,13 +28,6 @@ import '@angular/localize/init';
/** IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
Expand Down
4 changes: 2 additions & 2 deletions generators/app/templates/src/environments/_environment.ts
@@ -1,5 +1,5 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

// `.env.ts` is generated by the `npm run env` command
Expand All @@ -25,4 +25,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

0 comments on commit 49a3669

Please sign in to comment.