Skip to content

Commit 07dbe77

Browse files
committed
V7
1 parent 5b22752 commit 07dbe77

File tree

7 files changed

+12513
-6327
lines changed

7 files changed

+12513
-6327
lines changed

angular.json

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"workshop": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"schematics": {
11+
"@schematics/angular:component": {
12+
"styleext": "scss"
13+
},
14+
"@schematics/angular:directive": {
15+
"prefix": "blog"
16+
}
17+
},
18+
"architect": {
19+
"build": {
20+
"builder": "@angular-devkit/build-angular:browser",
21+
"options": {
22+
"outputPath": "dist",
23+
"index": "src/index.html",
24+
"main": "src/main.ts",
25+
"tsConfig": "src/tsconfig.app.json",
26+
"polyfills": "src/polyfills.ts",
27+
"assets": ["src/assets", "src/favicon.ico"],
28+
"styles": ["src/styles.scss"],
29+
"scripts": []
30+
},
31+
"configurations": {
32+
"production": {
33+
"optimization": true,
34+
"outputHashing": "all",
35+
"sourceMap": false,
36+
"extractCss": true,
37+
"namedChunks": false,
38+
"aot": true,
39+
"extractLicenses": true,
40+
"vendorChunk": false,
41+
"buildOptimizer": true,
42+
"fileReplacements": [
43+
{
44+
"replace": "src/environments/environment.ts",
45+
"with": "src/environments/environment.prod.ts"
46+
}
47+
]
48+
}
49+
}
50+
},
51+
"serve": {
52+
"builder": "@angular-devkit/build-angular:dev-server",
53+
"options": {
54+
"browserTarget": "workshop:build"
55+
},
56+
"configurations": {
57+
"production": {
58+
"browserTarget": "workshop:build:production"
59+
}
60+
}
61+
},
62+
"extract-i18n": {
63+
"builder": "@angular-devkit/build-angular:extract-i18n",
64+
"options": {
65+
"browserTarget": "workshop:build"
66+
}
67+
},
68+
"test": {
69+
"builder": "@angular-devkit/build-angular:karma",
70+
"options": {
71+
"main": "src/test.ts",
72+
"karmaConfig": "./karma.conf.js",
73+
"polyfills": "src/polyfills.ts",
74+
"tsConfig": "src/tsconfig.spec.json",
75+
"scripts": [],
76+
"styles": ["src/styles.scss"],
77+
"assets": ["src/assets", "src/favicon.ico"]
78+
}
79+
},
80+
"lint": {
81+
"builder": "@angular-devkit/build-angular:tslint",
82+
"options": {
83+
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
84+
"exclude": ["**/node_modules/**"]
85+
}
86+
}
87+
}
88+
},
89+
"workshop-e2e": {
90+
"root": "",
91+
"sourceRoot": "",
92+
"projectType": "application",
93+
"architect": {
94+
"e2e": {
95+
"builder": "@angular-devkit/build-angular:protractor",
96+
"options": {
97+
"protractorConfig": "./protractor.conf.js",
98+
"devServerTarget": "workshop:serve"
99+
}
100+
},
101+
"lint": {
102+
"builder": "@angular-devkit/build-angular:tslint",
103+
"options": {
104+
"tsConfig": ["e2e/tsconfig.e2e.json"],
105+
"exclude": ["**/node_modules/**"]
106+
}
107+
}
108+
}
109+
}
110+
},
111+
"defaultProject": "workshop"
112+
}

karma.conf.js

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,32 @@
11
// Karma configuration file, see link for more information
2-
// https://karma-runner.github.io/0.13/config/configuration-file.html
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4-
module.exports = function (config) {
4+
module.exports = function(config) {
55
config.set({
6-
basePath: '',
7-
frameworks: ['jasmine', '@angular/cli'],
6+
basePath: "",
7+
frameworks: ["jasmine", "@angular-devkit/build-angular"],
88
plugins: [
9-
require('karma-jasmine'),
10-
require('karma-phantomjs-launcher'),
11-
require('karma-remap-istanbul'),
12-
require('@angular/cli/plugins/karma')
9+
require("karma-jasmine"),
10+
require("karma-chrome-launcher"),
11+
require("karma-jasmine-html-reporter"),
12+
require("karma-coverage-istanbul-reporter"),
13+
require("@angular-devkit/build-angular/plugins/karma")
1314
],
14-
files: [
15-
{ pattern: './src/test.ts', watched: false }
16-
],
17-
preprocessors: {
18-
'./src/test.ts': ['@angular/cli']
19-
},
20-
mime: {
21-
'text/x-typescript': ['ts','tsx']
22-
},
23-
remapIstanbulReporter: {
24-
reports: {
25-
html: 'coverage',
26-
lcovonly: './coverage/coverage.lcov'
27-
}
15+
client: {
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
2817
},
29-
angularCli: {
30-
config: './angular-cli.json',
31-
environment: 'dev'
18+
coverageIstanbulReporter: {
19+
dir: require("path").join(__dirname, "../coverage/sportsbook"),
20+
reports: ["html", "lcovonly", "text-summary"],
21+
fixWebpackSourcePaths: true
3222
},
33-
reporters: config.angularCli && config.angularCli.codeCoverage
34-
? ['progress', 'karma-remap-istanbul']
35-
: ['progress'],
23+
reporters: ["progress", "kjhtml"],
3624
port: 9876,
3725
colors: true,
3826
logLevel: config.LOG_INFO,
3927
autoWatch: true,
40-
browsers: ['PhantomJS'],
41-
singleRun: false
28+
browsers: ["Chrome"],
29+
singleRun: false,
30+
restartOnFileChange: true
4231
});
4332
};

0 commit comments

Comments
 (0)