Skip to content

Commit cfe2387

Browse files
committed
feat(angular): update getting-started
1 parent 7702c9a commit cfe2387

26 files changed

+5564
-5799
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/getting-started/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ais-ecommerce-demo-app
1+
# getting-started
22

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

@@ -17,3 +17,5 @@ Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
1717
yarn
1818
yarn start
1919
```
20+
21+
Open http://localhost:3000 to see your app.

Angular InstantSearch/getting-started/angular.json

Lines changed: 48 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,126 +3,104 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"ais-ecommerce-demo-app": {
6+
"getting-started": {
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/ais-ecommerce-demo-app",
20+
"outputPath": "dist/getting-started",
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",
26+
"src/favicon.ico",
2327
"src/assets"
2428
],
2529
"styles": [
26-
"node_modules/angular-instantsearch/bundles/instantsearch-theme-algolia.min.css",
2730
"src/styles.css"
2831
],
2932
"scripts": []
3033
},
3134
"configurations": {
3235
"production": {
36+
"budgets": [
37+
{
38+
"type": "initial",
39+
"maximumWarning": "500kb",
40+
"maximumError": "1mb"
41+
},
42+
{
43+
"type": "anyComponentStyle",
44+
"maximumWarning": "2kb",
45+
"maximumError": "4kb"
46+
}
47+
],
3348
"fileReplacements": [
3449
{
3550
"replace": "src/environments/environment.ts",
3651
"with": "src/environments/environment.prod.ts"
3752
}
3853
],
39-
"optimization": true,
40-
"outputHashing": "all",
41-
"sourceMap": false,
42-
"extractCss": true,
43-
"namedChunks": false,
44-
"aot": true,
45-
"extractLicenses": true,
46-
"vendorChunk": false,
47-
"buildOptimizer": true
54+
"outputHashing": "all"
55+
},
56+
"development": {
57+
"buildOptimizer": false,
58+
"optimization": false,
59+
"vendorChunk": true,
60+
"extractLicenses": false,
61+
"sourceMap": true,
62+
"namedChunks": true
4863
}
49-
}
64+
},
65+
"defaultConfiguration": "production"
5066
},
5167
"serve": {
5268
"builder": "@angular-devkit/build-angular:dev-server",
53-
"options": {
54-
"browserTarget": "ais-ecommerce-demo-app:build"
55-
},
5669
"configurations": {
5770
"production": {
58-
"browserTarget": "ais-ecommerce-demo-app:build:production"
71+
"browserTarget": "getting-started:build:production"
72+
},
73+
"development": {
74+
"browserTarget": "getting-started:build:development"
5975
}
60-
}
76+
},
77+
"defaultConfiguration": "development"
6178
},
6279
"extract-i18n": {
6380
"builder": "@angular-devkit/build-angular:extract-i18n",
6481
"options": {
65-
"browserTarget": "ais-ecommerce-demo-app:build"
82+
"browserTarget": "getting-started:build"
6683
}
6784
},
6885
"test": {
6986
"builder": "@angular-devkit/build-angular:karma",
7087
"options": {
7188
"main": "src/test.ts",
7289
"polyfills": "src/polyfills.ts",
73-
"tsConfig": "src/tsconfig.spec.json",
74-
"karmaConfig": "src/karma.conf.js",
75-
"styles": [
76-
"src/styles.css"
77-
],
78-
"scripts": [],
90+
"tsConfig": "tsconfig.spec.json",
91+
"karmaConfig": "karma.conf.js",
7992
"assets": [
80-
"src/favicon.png",
93+
"src/favicon.ico",
8194
"src/assets"
82-
]
83-
}
84-
},
85-
"lint": {
86-
"builder": "@angular-devkit/build-angular:tslint",
87-
"options": {
88-
"tsConfig": [
89-
"src/tsconfig.app.json",
90-
"src/tsconfig.spec.json"
9195
],
92-
"exclude": [
93-
"**/node_modules/**"
94-
]
95-
}
96-
}
97-
}
98-
},
99-
"ais-ecommerce-demo-app-e2e": {
100-
"root": "e2e/",
101-
"projectType": "application",
102-
"architect": {
103-
"e2e": {
104-
"builder": "@angular-devkit/build-angular:protractor",
105-
"options": {
106-
"protractorConfig": "e2e/protractor.conf.js",
107-
"devServerTarget": "ais-ecommerce-demo-app:serve"
108-
},
109-
"configurations": {
110-
"production": {
111-
"devServerTarget": "ais-ecommerce-demo-app:serve:production"
112-
}
113-
}
114-
},
115-
"lint": {
116-
"builder": "@angular-devkit/build-angular:tslint",
117-
"options": {
118-
"tsConfig": "e2e/tsconfig.e2e.json",
119-
"exclude": [
120-
"**/node_modules/**"
121-
]
96+
"styles": [
97+
"src/styles.css"
98+
],
99+
"scripts": []
122100
}
123101
}
124102
}
125103
}
126104
},
127-
"defaultProject": "ais-ecommerce-demo-app"
105+
"defaultProject": "getting-started"
128106
}

Angular InstantSearch/getting-started/e2e/protractor.conf.js

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

Angular InstantSearch/getting-started/e2e/src/app.e2e-spec.ts

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

Angular InstantSearch/getting-started/e2e/src/app.po.ts

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

Angular InstantSearch/getting-started/e2e/tsconfig.e2e.json

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

Angular InstantSearch/getting-started/src/karma.conf.js renamed to Angular InstantSearch/getting-started/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/getting-started'),
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)