Skip to content

Commit 529dcf9

Browse files
tkruggHaroenv
andauthored
fix(Angular InstantSearch): upgrade Autocomplete Example (#251)
Co-authored-by: Haroen Viaene <[email protected]>
1 parent 3fbb80d commit 529dcf9

33 files changed

+5607
-5367
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

Angular InstantSearch/autocomplete-results-page/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# multi-index-autocomplete
1+
# autocomplete-results-page
22

33
_This project was generated with [create-instantsearch-app](https://github.com/algolia/create-instantsearch-app) by [Algolia](https://algolia.com)._
44

Angular InstantSearch/autocomplete-results-page/angular.json

Lines changed: 49 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,130 +3,106 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"multi-index-autocomplete": {
6+
"autocomplete-results-page": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
713
"root": "",
814
"sourceRoot": "src",
9-
"projectType": "application",
1015
"prefix": "app",
11-
"schematics": {},
1216
"architect": {
1317
"build": {
1418
"builder": "@angular-devkit/build-angular:browser",
1519
"options": {
16-
"outputPath": "dist/multi-index-autocomplete",
20+
"outputPath": "dist/autocomplete-results-page",
1721
"index": "src/index.html",
1822
"main": "src/main.ts",
1923
"polyfills": "src/polyfills.ts",
20-
"tsConfig": "src/tsconfig.app.json",
24+
"tsConfig": "tsconfig.app.json",
2125
"assets": [
22-
"src/favicon.png",
23-
"src/manifest.json",
26+
"src/favicon.ico",
2427
"src/assets"
2528
],
2629
"styles": [
2730
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
28-
"node_modules/instantsearch.css/themes/reset.css",
29-
"node_modules/instantsearch.css/themes/algolia.css",
3031
"src/styles.css"
3132
],
3233
"scripts": []
3334
},
3435
"configurations": {
3536
"production": {
37+
"budgets": [
38+
{
39+
"type": "initial",
40+
"maximumWarning": "500kb",
41+
"maximumError": "1mb"
42+
},
43+
{
44+
"type": "anyComponentStyle",
45+
"maximumWarning": "2kb",
46+
"maximumError": "4kb"
47+
}
48+
],
3649
"fileReplacements": [
3750
{
3851
"replace": "src/environments/environment.ts",
3952
"with": "src/environments/environment.prod.ts"
4053
}
4154
],
42-
"optimization": true,
43-
"outputHashing": "all",
44-
"sourceMap": false,
45-
"extractCss": true,
46-
"namedChunks": false,
47-
"aot": true,
48-
"extractLicenses": true,
49-
"vendorChunk": false,
50-
"buildOptimizer": true
55+
"outputHashing": "all"
56+
},
57+
"development": {
58+
"buildOptimizer": false,
59+
"optimization": false,
60+
"vendorChunk": true,
61+
"extractLicenses": false,
62+
"sourceMap": true,
63+
"namedChunks": true
5164
}
52-
}
65+
},
66+
"defaultConfiguration": "production"
5367
},
5468
"serve": {
5569
"builder": "@angular-devkit/build-angular:dev-server",
56-
"options": {
57-
"browserTarget": "multi-index-autocomplete:build"
58-
},
5970
"configurations": {
6071
"production": {
61-
"browserTarget": "multi-index-autocomplete:build:production"
72+
"browserTarget": "autocomplete-results-page:build:production"
73+
},
74+
"development": {
75+
"browserTarget": "autocomplete-results-page:build:development"
6276
}
63-
}
77+
},
78+
"defaultConfiguration": "development"
6479
},
6580
"extract-i18n": {
6681
"builder": "@angular-devkit/build-angular:extract-i18n",
6782
"options": {
68-
"browserTarget": "multi-index-autocomplete:build"
83+
"browserTarget": "autocomplete-results-page:build"
6984
}
7085
},
7186
"test": {
7287
"builder": "@angular-devkit/build-angular:karma",
7388
"options": {
7489
"main": "src/test.ts",
7590
"polyfills": "src/polyfills.ts",
76-
"tsConfig": "src/tsconfig.spec.json",
77-
"karmaConfig": "src/karma.conf.js",
91+
"tsConfig": "tsconfig.spec.json",
92+
"karmaConfig": "karma.conf.js",
93+
"assets": [
94+
"src/favicon.ico",
95+
"src/assets"
96+
],
7897
"styles": [
7998
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
8099
"src/styles.css"
81100
],
82-
"scripts": [],
83-
"assets": [
84-
"src/favicon.png",
85-
"src/assets"
86-
]
87-
}
88-
},
89-
"lint": {
90-
"builder": "@angular-devkit/build-angular:tslint",
91-
"options": {
92-
"tsConfig": [
93-
"src/tsconfig.app.json",
94-
"src/tsconfig.spec.json"
95-
],
96-
"exclude": [
97-
"**/node_modules/**"
98-
]
99-
}
100-
}
101-
}
102-
},
103-
"multi-index-autocomplete-e2e": {
104-
"root": "e2e/",
105-
"projectType": "application",
106-
"architect": {
107-
"e2e": {
108-
"builder": "@angular-devkit/build-angular:protractor",
109-
"options": {
110-
"protractorConfig": "e2e/protractor.conf.js",
111-
"devServerTarget": "multi-index-autocomplete:serve"
112-
},
113-
"configurations": {
114-
"production": {
115-
"devServerTarget": "multi-index-autocomplete:serve:production"
116-
}
117-
}
118-
},
119-
"lint": {
120-
"builder": "@angular-devkit/build-angular:tslint",
121-
"options": {
122-
"tsConfig": "e2e/tsconfig.e2e.json",
123-
"exclude": [
124-
"**/node_modules/**"
125-
]
101+
"scripts": []
126102
}
127103
}
128104
}
129105
}
130106
},
131-
"defaultProject": "multi-index-autocomplete"
132-
}
107+
"defaultProject": "autocomplete-results-page"
108+
}

Angular InstantSearch/autocomplete-results-page/e2e/protractor.conf.js

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

Angular InstantSearch/autocomplete-results-page/e2e/src/app.e2e-spec.ts

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

Angular InstantSearch/autocomplete-results-page/e2e/src/app.po.ts

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

Angular InstantSearch/autocomplete-results-page/e2e/tsconfig.e2e.json

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

Angular InstantSearch/autocomplete-results-page/src/karma.conf.js renamed to Angular InstantSearch/autocomplete-results-page/karma.conf.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,36 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, '../coverage'),
20-
reports: ['html', 'lcovonly'],
21-
fixWebpackSourcePaths: true
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/autocomplete-results-page'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2234
},
2335
reporters: ['progress', 'kjhtml'],
2436
port: 9876,
2537
colors: true,
2638
logLevel: config.LOG_INFO,
2739
autoWatch: true,
2840
browsers: ['Chrome'],
29-
singleRun: false
41+
singleRun: false,
42+
restartOnFileChange: true
3043
});
31-
};
44+
};

0 commit comments

Comments
 (0)