Skip to content

Commit

Permalink
docs(examples): update for parcel (#1081)
Browse files Browse the repository at this point in the history
Not sure when these requirements were added, but type needs to be module and jsxRuntime needs to be classic
  • Loading branch information
Haroenv authored Feb 2, 2023
1 parent 17a38f7 commit 50bdbd1
Show file tree
Hide file tree
Showing 63 changed files with 86 additions and 46 deletions.
1 change: 1 addition & 0 deletions cypress/test-apps/js/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
1 change: 1 addition & 0 deletions cypress/test-apps/js/categoriesPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompletePlugin, getAlgoliaFacets } from '@algolia/autocomplete-js';
import { SearchClient } from 'algoliasearch/lite';
Expand Down
6 changes: 3 additions & 3 deletions cypress/test-apps/js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
</div>
</div>

<script src="env.ts"></script>
<script src="darkMode.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="darkMode.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/github-notification-filters/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete, AutocompleteSource } from '@algolia/autocomplete-js';
import { createTagsPlugin, Tag } from '@algolia/autocomplete-plugin-tags';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { h, Fragment } from 'preact';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompleteState } from '@algolia/autocomplete-js';
import { ComponentChildren, h } from 'preact';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompleteComponents } from '@algolia/autocomplete-js';
import { h } from 'preact';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { h } from 'preact';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { h } from 'preact';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { Tag } from '@algolia/autocomplete-plugin-tags';
import { h } from 'preact';
Expand Down
4 changes: 2 additions & 2 deletions examples/github-notification-filters/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompletePlugin } from '@algolia/autocomplete-js';
import { h } from 'preact';
Expand Down
4 changes: 2 additions & 2 deletions examples/github-repositories-custom-plugin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions examples/html-templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.js"></script>
<script src="app.js"></script>
<script type="module" src="env.js"></script>
<script type="module" src="app.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/multiple-datasets-with-headers/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompletePlugin, getAlgoliaFacets } from '@algolia/autocomplete-js';
import { SearchClient } from 'algoliasearch/lite';
Expand Down
4 changes: 2 additions & 2 deletions examples/multiple-datasets-with-headers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/panel-placement/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
4 changes: 2 additions & 2 deletions examples/panel-placement/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div id="autocomplete-right"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/playground/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
1 change: 1 addition & 0 deletions examples/playground/categoriesPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompletePlugin, getAlgoliaFacets } from '@algolia/autocomplete-js';
import { SearchClient } from 'algoliasearch/lite';
Expand Down
6 changes: 3 additions & 3 deletions examples/playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
</div>
</div>

<script src="env.ts"></script>
<script src="darkMode.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="darkMode.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/preview-panel-in-modal/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import algoliasearch from 'algoliasearch/lite';
Expand Down
4 changes: 2 additions & 2 deletions examples/preview-panel-in-modal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions examples/query-suggestions-with-categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/query-suggestions-with-hits/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
4 changes: 2 additions & 2 deletions examples/query-suggestions-with-hits/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/query-suggestions-with-inline-categories/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
Expand Down
4 changes: 2 additions & 2 deletions examples/query-suggestions-with-inline-categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/query-suggestions-with-recent-searches/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
Expand Down
4 changes: 2 additions & 2 deletions examples/query-suggestions-with-recent-searches/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions examples/query-suggestions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/react-instantsearch/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

<div id="root"></div>

<script src="./src/index.js"></script>
<script type="module" src="./src/index.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/recently-viewed-items/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
4 changes: 2 additions & 2 deletions examples/recently-viewed-items/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompletePlugin,
Expand Down
1 change: 1 addition & 0 deletions examples/reshape/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
Expand Down
4 changes: 2 additions & 2 deletions examples/reshape/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/reshape/productsPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompleteComponents,
Expand Down
1 change: 1 addition & 0 deletions examples/starter-algolia/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import { Hit } from '@algolia/client-search';
Expand Down
4 changes: 2 additions & 2 deletions examples/starter-algolia/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions examples/starter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/tags-in-searchbox/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
4 changes: 2 additions & 2 deletions examples/tags-in-searchbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div id="autocomplete"></div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/tags-with-hits/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
autocomplete,
Expand Down
4 changes: 2 additions & 2 deletions examples/tags-with-hits/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
</div>
</div>

<script src="env.ts"></script>
<script src="app.tsx"></script>
<script type="module" src="env.ts"></script>
<script type="module" src="app.tsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/two-column-layout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<div id="autocomplete"></div>
</div>

<script src="src/app.tsx"></script>
<script type="module" src="src/app.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/two-column-layout/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete } from '@algolia/autocomplete-js';
import { h, render } from 'preact';
Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/components/Blurhash.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { decode } from 'blurhash';
import { h } from 'preact';
Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/components/Breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { h } from 'preact';

Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/components/Icons.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { h } from 'preact';

Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/plugins/articlesPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompletePlugin,
Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/plugins/brandsPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompleteComponents,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompleteComponents,
Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/plugins/faqPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompleteComponents,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import {
AutocompleteComponents,
Expand Down
1 change: 1 addition & 0 deletions examples/two-column-layout/src/plugins/popularPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxRuntime classic */
/** @jsx h */
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import { h } from 'preact';
Expand Down
Loading

0 comments on commit 50bdbd1

Please sign in to comment.