Skip to content

Commit 242394e

Browse files
feat(angular): update to angular 10.x (#14)
* feat(angular): update to angular 10.x * update node img * fix lint * scss include paths for test
1 parent a126303 commit 242394e

34 files changed

+21053
-14413
lines changed

.browserslistrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
build:
44
working_directory: ~/app
55
docker:
6-
- image: circleci/node:9.8-browsers
6+
- image: circleci/node:14.5-browsers
77
environment:
88
- CHROME_BIN: "/usr/bin/google-chrome"
99
steps:

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "./node_modules/@ssv/tools/base.eslintrc"
2+
"extends": "./node_modules/@ssv/tools/config/.eslintrc"
33
}

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
/dist
55
/tmp
66
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
79

810
# dependencies
911
/node_modules
1012

13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
1117
# IDEs and editors
1218
/.idea
1319
.project
@@ -23,20 +29,18 @@
2329
!.vscode/tasks.json
2430
!.vscode/launch.json
2531
!.vscode/extensions.json
32+
.history/*
2633

2734
# misc
2835
/.sass-cache
2936
/connect.lock
3037
/coverage
3138
/libpeerconnection.log
3239
npm-debug.log
40+
yarn-error.log
3341
testem.log
3442
/typings
3543

36-
# e2e
37-
/e2e/*.js
38-
/e2e/*.map
39-
4044
# System Files
4145
.DS_Store
4246
Thumbs.db

.stylelintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./node_modules/@ssv/tools/base.stylelintrc",
2+
"extends": "./node_modules/@ssv/tools/config/.stylelintrc",
33
"rules": {
44
"max-nesting-depth": [
55
5,

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Angular Skeleton App
2-
Angular 7.x navigation skeleton project with styling which get you started faster.
2+
Angular 10.x navigation skeleton project with styling which get you started faster.
33

44
## What does it have?
5-
- Angular CLI 7.0 template
5+
- Angular CLI 10.x template
66
- SCSS for styling
77
- Font Awesome and Bootstrap 4.x (no javascript, just styles)
88
- Navigation/layout
@@ -29,7 +29,7 @@ Run `npm run start:prod` build and run for production.
2929

3030
# Angular CLI
3131

32-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.
32+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.2.
3333

3434
## Development server
3535

@@ -41,7 +41,7 @@ Run `ng generate component component-name` to generate a new component. You can
4141

4242
## Build
4343

44-
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.
44+
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.
4545

4646
## Running unit tests
4747

angular.json

Lines changed: 49 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,34 @@
44
"newProjectRoot": "projects",
55
"projects": {
66
"angular-skeleton-app": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
713
"root": "",
814
"sourceRoot": "src",
9-
"projectType": "application",
15+
"prefix": "app",
1016
"architect": {
1117
"build": {
1218
"builder": "@angular-devkit/build-angular:browser",
1319
"options": {
14-
"outputPath": "dist",
20+
"outputPath": "dist/angular-skeleton-app",
1521
"index": "src/index.html",
1622
"main": "src/main.ts",
17-
"tsConfig": "src/tsconfig.app.json",
1823
"polyfills": "src/polyfills.ts",
19-
"preserveSymlinks": true,
2024
"stylePreprocessorOptions": {
2125
"includePaths": [
2226
"src/assets/styles"
2327
]
2428
},
29+
"tsConfig": "tsconfig.app.json",
30+
"aot": true,
2531
"assets": [
32+
"src/favicon.ico",
2633
"src/assets",
27-
"src/favicon.ico"
34+
"src/manifest.webmanifest"
2835
],
2936
"styles": [
3037
"src/styles.scss"
@@ -33,6 +40,12 @@
3340
},
3441
"configurations": {
3542
"production": {
43+
"fileReplacements": [
44+
{
45+
"replace": "src/environments/environment.ts",
46+
"with": "src/environments/environment.prod.ts"
47+
}
48+
],
3649
"optimization": true,
3750
"outputHashing": "all",
3851
"sourceMap": false,
@@ -42,13 +55,20 @@
4255
"extractLicenses": true,
4356
"vendorChunk": false,
4457
"buildOptimizer": true,
45-
"serviceWorker": true,
46-
"fileReplacements": [
58+
"budgets": [
4759
{
48-
"replace": "src/environments/environment.ts",
49-
"with": "src/environments/environment.prod.ts"
60+
"type": "initial",
61+
"maximumWarning": "2mb",
62+
"maximumError": "5mb"
63+
},
64+
{
65+
"type": "anyComponentStyle",
66+
"maximumWarning": "6kb",
67+
"maximumError": "10kb"
5068
}
51-
]
69+
],
70+
"serviceWorker": true,
71+
"ngswConfigPath": "ngsw-config.json"
5272
}
5373
}
5474
},
@@ -73,10 +93,14 @@
7393
"builder": "@angular-devkit/build-angular:karma",
7494
"options": {
7595
"main": "src/test.ts",
76-
"karmaConfig": "./karma.conf.js",
7796
"polyfills": "src/polyfills.ts",
78-
"tsConfig": "src/tsconfig.spec.json",
79-
"scripts": [],
97+
"tsConfig": "tsconfig.spec.json",
98+
"karmaConfig": "karma.conf.js",
99+
"assets": [
100+
"src/favicon.ico",
101+
"src/assets",
102+
"src/manifest.webmanifest"
103+
],
80104
"styles": [
81105
"src/styles.scss"
82106
],
@@ -85,69 +109,39 @@
85109
"src/assets/styles"
86110
]
87111
},
88-
"assets": [
89-
"src/assets",
90-
"src/favicon.ico"
91-
]
112+
"scripts": []
92113
}
93114
},
94115
"lint": {
95116
"builder": "@angular-devkit/build-angular:tslint",
96117
"options": {
97118
"tsConfig": [
98-
"src/tsconfig.app.json",
99-
"src/tsconfig.spec.json"
119+
"tsconfig.app.json",
120+
"tsconfig.spec.json",
121+
"e2e/tsconfig.json"
100122
],
101123
"exclude": [
102124
"**/node_modules/**"
103125
]
104126
}
105127
},
106-
"server": {
107-
"builder": "@angular-devkit/build-angular:server",
108-
"options": {
109-
"outputPath": "dist-server/",
110-
"main": "main.server.ts",
111-
"tsConfig": "tsconfig.server.json"
112-
}
113-
}
114-
}
115-
},
116-
"angular-skeleton-app-e2e": {
117-
"root": "",
118-
"sourceRoot": "",
119-
"projectType": "application",
120-
"architect": {
121128
"e2e": {
122129
"builder": "@angular-devkit/build-angular:protractor",
123130
"options": {
124-
"protractorConfig": "./protractor.conf.js",
131+
"protractorConfig": "e2e/protractor.conf.js",
125132
"devServerTarget": "angular-skeleton-app:serve"
126-
}
127-
},
128-
"lint": {
129-
"builder": "@angular-devkit/build-angular:tslint",
130-
"options": {
131-
"tsConfig": [
132-
"e2e/tsconfig.e2e.json"
133-
],
134-
"exclude": [
135-
"**/node_modules/**"
136-
]
133+
},
134+
"configurations": {
135+
"production": {
136+
"devServerTarget": "angular-skeleton-app:serve:production"
137+
}
137138
}
138139
}
139140
}
140141
}
141142
},
142143
"defaultProject": "angular-skeleton-app",
143-
"schematics": {
144-
"@schematics/angular:component": {
145-
"spec": false,
146-
"prefix": "app",
147-
"styleext": "scss"
148-
},
149-
"@schematics/angular:directive": {
150-
"prefix": "app"
151-
}
144+
"cli": {
145+
"analytics": "420c9a77-bc8c-4149-b9d9-02459302fa81"
152146
}
153147
}

e2e/app.e2e-spec.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

e2e/app.po.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
// @ts-check
12
// Protractor configuration file, see link for more information
23
// https://github.com/angular/protractor/blob/master/lib/config.ts
34

45
const { SpecReporter } = require('jasmine-spec-reporter');
56

7+
/**
8+
* @type { import("protractor").Config }
9+
*/
610
exports.config = {
711
allScriptsTimeout: 11000,
812
specs: [
9-
'./e2e/**/*.e2e-spec.ts'
13+
'./src/**/*.e2e-spec.ts'
1014
],
1115
capabilities: {
12-
'browserName': 'chrome'
16+
browserName: 'chrome'
1317
},
1418
directConnect: true,
1519
baseUrl: 'http://localhost:4200/',
@@ -21,8 +25,8 @@ exports.config = {
2125
},
2226
onPrepare() {
2327
require('ts-node').register({
24-
project: 'e2e/tsconfig.e2e.json'
28+
project: require('path').join(__dirname, './tsconfig.json')
2529
});
2630
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
2731
}
28-
};
32+
};

0 commit comments

Comments
 (0)