Skip to content

Commit

Permalink
chore(Angular IS): upgrade debounced-search-box example to Angular 12 (
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrugg authored Nov 16, 2021
1 parent 6ed8e60 commit 66e95b5
Show file tree
Hide file tree
Showing 36 changed files with 5,728 additions and 5,918 deletions.
17 changes: 17 additions & 0 deletions Angular InstantSearch/debounced-search-box/.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/debounced-search-box/.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/debounced-search-box/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ais-ecommerce-demo-app
# debounced-search-box

_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.
126 changes: 47 additions & 79 deletions Angular InstantSearch/debounced-search-box/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,126 +3,94 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ais-ecommerce-demo-app": {
"debounced-search-box": {
"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/debounced-search-box",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.png",
"src/assets"
],
"styles": [
"node_modules/angular-instantsearch/bundles/instantsearch-theme-algolia.min.css",
"src/styles.css"
],
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["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": "debounced-search-box:build:production"
},
"development": {
"browserTarget": "debounced-search-box:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ais-ecommerce-demo-app:build"
"browserTarget": "debounced-search-box: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": [],
"assets": [
"src/favicon.png",
"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/**"
]
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
}
}
}
}
},
"defaultProject": "ais-ecommerce-demo-app"
"defaultProject": "debounced-search-box"
}
28 changes: 0 additions & 28 deletions Angular InstantSearch/debounced-search-box/e2e/protractor.conf.js

This file was deleted.

14 changes: 0 additions & 14 deletions Angular InstantSearch/debounced-search-box/e2e/src/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions Angular InstantSearch/debounced-search-box/e2e/src/app.po.ts

This file was deleted.

13 changes: 0 additions & 13 deletions Angular InstantSearch/debounced-search-box/e2e/tsconfig.e2e.json

This file was deleted.

41 changes: 41 additions & 0 deletions Angular InstantSearch/debounced-search-box/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-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
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/debounced-search-box'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
});
};
Loading

0 comments on commit 66e95b5

Please sign in to comment.