Skip to content

Commit 1baf72d

Browse files
committed
feat(js): multi index hits
1 parent b41b66f commit 1baf72d

File tree

14 files changed

+5818
-0
lines changed

14 files changed

+5818
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules
2+
/dist
3+
/.cache
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: 'algolia',
3+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/dist
11+
/.cache
12+
13+
# misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"proseWrap": "never",
4+
"trailingComma": "es5"
5+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# multi-index-hits
2+
3+
_This project was generated with [create-instantsearch-app](https://github.com/algolia/create-instantsearch-app) by [Algolia](https://algolia.com)._
4+
5+
## Get started
6+
7+
To run this project locally, install the dependencies and run the local server:
8+
9+
```sh
10+
npm install
11+
npm start
12+
```
13+
14+
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
15+
16+
```sh
17+
yarn
18+
yarn start
19+
```
20+
21+
Open http://localhost:3000 to see your app.
906 Bytes
Loading
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
9+
<link rel="manifest" href="./manifest.webmanifest">
10+
<link rel="shortcut icon" href="./favicon.png">
11+
12+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.css">
13+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch-theme-algolia.min.css">
14+
<link rel="stylesheet" href="./src/index.css">
15+
<link rel="stylesheet" href="./src/app.css">
16+
17+
<title>multi-index-hits</title>
18+
</head>
19+
20+
<body>
21+
<div class="container">
22+
<h1>InstantSearch.js - Hits from multiple indices</h1>
23+
<div id="searchbox"></div>
24+
25+
<h2>index: instant_search</h2>
26+
<div id="hits-instant-search"></div>
27+
28+
<h2>index: bestbuy</h2>
29+
<div id="hits-best-buy"></div>
30+
</div>
31+
32+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearchLite.min.js"></script>
33+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
34+
<script src="./src/app.js"></script>
35+
</body>
36+
37+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "multi-index-hits",
3+
"name": "multi-index-hits Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.png",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": "./index.html",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "multi-index-hits",
3+
"version": "1.0.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "parcel index.html --port 3000",
7+
"build": "parcel build index.html",
8+
"lint": "eslint .",
9+
"lint:fix": "npm run lint -- --fix"
10+
},
11+
"devDependencies": {
12+
"babel-eslint": "8.2.6",
13+
"eslint": "5.5.0",
14+
"eslint-config-algolia": "13.2.3",
15+
"eslint-config-prettier": "3.0.1",
16+
"eslint-plugin-import": "2.14.0",
17+
"eslint-plugin-prettier": "2.6.2",
18+
"parcel-bundler": "1.9.7",
19+
"prettier": "1.14.2"
20+
}
21+
}

0 commit comments

Comments
 (0)