Skip to content

Commit 2ea5580

Browse files
chore(angular): update project structure to match the cli
1 parent 1d36e07 commit 2ea5580

File tree

11 files changed

+79
-95
lines changed

11 files changed

+79
-95
lines changed

Phonebook.Frontend/.gitignore

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
dist/
4+
/dist
55
/tmp
66
/out-tsc
7-
/src/changelog.md
7+
# Only exists if Bazel was run
8+
/bazel-out
89

910
# dependencies
10-
node_modules/
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events.json
15+
speed-measure-plugin.json
1116

1217
# IDEs and editors
1318
/.idea
@@ -24,23 +29,28 @@ node_modules/
2429
!.vscode/tasks.json
2530
!.vscode/launch.json
2631
!.vscode/extensions.json
32+
.history/*
2733

2834
# misc
2935
/.sass-cache
3036
/connect.lock
3137
/coverage
3238
/libpeerconnection.log
3339
npm-debug.log
40+
yarn-error.log
3441
testem.log
3542
/typings
36-
yarn-error.log
3743
key.pem
3844
cert.pem
3945

40-
# e2e
41-
/e2e/*.js
42-
/e2e/*.map
43-
4446
# System Files
4547
.DS_Store
46-
Thumbs.db
48+
Thumbs.db
49+
50+
51+
# Custom Settings
52+
53+
/src/changelog.md
54+
55+
## e2e
56+
/e2e/*.map

Phonebook.Frontend/angular.json

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"outputPath": "dist",
1515
"index": "src/index.html",
1616
"main": "src/main.ts",
17-
"tsConfig": "src/tsconfig.app.json",
17+
"tsConfig": "tsconfig.app.json",
1818
"polyfills": "src/polyfills.ts",
1919
"assets": [
2020
"src/assets",
@@ -79,7 +79,7 @@
7979
"index": "src/index.html",
8080
"main": "src/main.ts",
8181
"showCircularDependencies": true,
82-
"tsConfig": "src/tsconfig.app.json",
82+
"tsConfig": "tsconfig.app.json",
8383
"polyfills": "src/polyfills.ts",
8484
"assets": [
8585
"src/assets",
@@ -112,7 +112,8 @@
112112
"replace": "src/environments/environment.ts",
113113
"with": "src/environments/environment.prod.ts"
114114
}
115-
]
115+
],
116+
"webWorkerTsConfig": "tsconfig.worker.json"
116117
},
117118
"configurations": {
118119
"en": {
@@ -172,7 +173,7 @@
172173
"main": "src/test.ts",
173174
"karmaConfig": "./karma.conf.js",
174175
"polyfills": "src/polyfills.ts",
175-
"tsConfig": "src/tsconfig.spec.json",
176+
"tsConfig": "tsconfig.spec.json",
176177
"scripts": [],
177178
"sourceMap": false,
178179
"styles": [
@@ -196,38 +197,22 @@
196197
"builder": "@angular-devkit/build-angular:tslint",
197198
"options": {
198199
"tsConfig": [
199-
"src/tsconfig.app.json",
200-
"src/tsconfig.spec.json"
200+
"tsconfig.app.json",
201+
"tsconfig.spec.json",
202+
"e2e/tsconfig.json",
203+
"tsconfig.worker.json"
201204
],
202205
"exclude": [
203206
"**/node_modules/**"
204207
]
205208
}
206-
}
207-
}
208-
},
209-
"phonebook-e2e": {
210-
"root": "",
211-
"sourceRoot": "",
212-
"projectType": "application",
213-
"architect": {
209+
},
214210
"e2e": {
215211
"builder": "@angular-devkit/build-angular:protractor",
216212
"options": {
217-
"protractorConfig": "./protractor.conf.js",
213+
"protractorConfig": "e2e/protractor.conf.js",
218214
"devServerTarget": "phonebook:serve"
219215
}
220-
},
221-
"lint": {
222-
"builder": "@angular-devkit/build-angular:tslint",
223-
"options": {
224-
"tsConfig": [
225-
"e2e/tsconfig.e2e.json"
226-
],
227-
"exclude": [
228-
"**/node_modules/**"
229-
]
230-
}
231216
}
232217
}
233218
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ process.env.CHROME_BIN = require('puppeteer').executablePath();
66

77
const { SpecReporter } = require('jasmine-spec-reporter');
88

9+
/**
10+
* @type { import("protractor").Config }
11+
*/
912
exports.config = {
1013
allScriptsTimeout: 11000,
11-
specs: ['./e2e/**/*.e2e-spec.ts'],
14+
specs: ['./src/e2e/**/*.e2e-spec.ts'],
1215
capabilities: {
1316
browserName: 'chrome',
1417
binary: process.env.CHROME_BIN,
@@ -26,7 +29,7 @@ exports.config = {
2629
},
2730
onPrepare() {
2831
require('ts-node').register({
29-
project: 'e2e/tsconfig.e2e.json'
32+
project: require('path').join(__dirname, './tsconfig.json')
3033
});
3134
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
3235
},
File renamed without changes.
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/e2e",
5-
"baseUrl": "./",
65
"module": "commonjs",
76
"target": "es5",
8-
"types": [
9-
"jasmine",
10-
"jasminewd2",
11-
"node"
12-
]
7+
"types": ["jasmine", "jasminewd2", "node"]
138
}
14-
}
9+
}

Phonebook.Frontend/src/tsconfig.spec.json

Lines changed: 0 additions & 18 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
{
2-
"extends": "../tsconfig.json",
3-
"compilerOptions": {
4-
"outDir": "../out-tsc/app",
5-
"types": [
6-
"node"
7-
],
8-
"strict": true,
9-
"strictNullChecks": true,
10-
"noImplicitAny": false
11-
},
12-
"angularCompilerOptions": {
13-
"fullTemplateTypeCheck": true,
14-
"strictInjectionParameters": true,
15-
"preserveWhitespaces": false,
16-
"strictPropertyInitialization": false
17-
},
18-
"exclude": [
19-
"test.ts",
20-
"**/*.spec.ts"
21-
]
22-
}
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./out-tsc/app",
5+
"types": [],
6+
"strict": true,
7+
"strictNullChecks": true,
8+
"noImplicitAny": false
9+
},
10+
"angularCompilerOptions": {
11+
"fullTemplateTypeCheck": true,
12+
"strictInjectionParameters": true,
13+
"preserveWhitespaces": false,
14+
"strictPropertyInitialization": false
15+
},
16+
"include": ["src/**/*.ts"],
17+
"exclude": ["src/test.ts", "src/**/*.spec.ts", "src/**/*.worker.ts"]
18+
}

Phonebook.Frontend/tsconfig.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,17 @@
22
"compileOnSave": false,
33
"compilerOptions": {
44
"baseUrl": "./",
5-
"downlevelIteration": true,
6-
"module": "esnext",
75
"outDir": "./dist/out-tsc",
86
"sourceMap": true,
97
"declaration": false,
8+
"module": "esnext",
109
"moduleResolution": "node",
1110
"emitDecoratorMetadata": true,
1211
"experimentalDecorators": true,
12+
"importHelpers": true,
1313
"target": "es2015",
14-
"typeRoots": [
15-
"node_modules/@types"
16-
],
17-
"lib": [
18-
"es2017",
19-
"dom"
20-
],
21-
"paths": {}
14+
"typeRoots": ["node_modules/@types"],
15+
"lib": ["es2018", "dom"],
16+
"downlevelIteration": true
2217
}
23-
}
18+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./out-tsc/spec",
5+
"types": ["jasmine", "node"]
6+
},
7+
"files": ["src/test.ts", "src/polyfills.ts"],
8+
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
9+
}

0 commit comments

Comments
 (0)