Skip to content

Commit

Permalink
chore(Angular IS): upgrade loading-indicator example to Angular 12 (#261
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tkrugg authored Nov 16, 2021
1 parent f655596 commit 6ed8e60
Show file tree
Hide file tree
Showing 35 changed files with 5,694 additions and 5,881 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ jobs:
path: "Angular InstantSearch/getting-started"
- build_project:
path: "Angular InstantSearch/infinite-scroll"
- build_project:
path: "Angular InstantSearch/loading-indicator"
- build_project:
path: "Angular InstantSearch/multi-index-autocomplete"
- build_project:
Expand Down
17 changes: 17 additions & 0 deletions Angular InstantSearch/loading-indicator/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
16 changes: 16 additions & 0 deletions Angular InstantSearch/loading-indicator/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
4 changes: 3 additions & 1 deletion Angular InstantSearch/loading-indicator/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ais-ecommerce-demo-app
# loading-indicator

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

Expand All @@ -17,3 +17,5 @@ Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
yarn
yarn start
```

Open http://localhost:3000 to see your app.
118 changes: 48 additions & 70 deletions Angular InstantSearch/loading-indicator/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,126 +3,104 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ais-ecommerce-demo-app": {
"loading-indicator": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ais-ecommerce-demo-app",
"outputPath": "dist/loading-indicator",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.png",
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/angular-instantsearch/bundles/instantsearch-theme-algolia.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ais-ecommerce-demo-app:build"
},
"configurations": {
"production": {
"browserTarget": "ais-ecommerce-demo-app:build:production"
"browserTarget": "loading-indicator:build:production"
},
"development": {
"browserTarget": "loading-indicator:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ais-ecommerce-demo-app:build"
"browserTarget": "loading-indicator:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.png",
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ais-ecommerce-demo-app-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ais-ecommerce-demo-app:serve"
},
"configurations": {
"production": {
"devServerTarget": "ais-ecommerce-demo-app:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
"styles": [
"src/styles.css"
],
"scripts": []
}
}
}
}
},
"defaultProject": "ais-ecommerce-demo-app"
"defaultProject": "loading-indicator"
}
28 changes: 0 additions & 28 deletions Angular InstantSearch/loading-indicator/e2e/protractor.conf.js

This file was deleted.

14 changes: 0 additions & 14 deletions Angular InstantSearch/loading-indicator/e2e/src/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions Angular InstantSearch/loading-indicator/e2e/src/app.po.ts

This file was deleted.

13 changes: 0 additions & 13 deletions Angular InstantSearch/loading-indicator/e2e/tsconfig.e2e.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,36 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/loading-indicator'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
restartOnFileChange: true
});
};
};
Loading

0 comments on commit 6ed8e60

Please sign in to comment.