Skip to content

Commit

Permalink
Rewrite to use Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriLojda committed Jul 9, 2024
1 parent 973c43d commit a647dac
Show file tree
Hide file tree
Showing 22 changed files with 15,439 additions and 36,021 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"@kontent-ai",
"@kontent-ai/eslint-config/react",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: [
"./tsconfig.json",
"./tsconfig.node.json",
"./src/functions/tsconfig.json",
],
},
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
};
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ jobs:
- run: npm ci
- uses: dprint/[email protected]
- run: npm run build
- run: npm run lintFunctions
- run: npm run checkFunctions
- run: npm run lint
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ You can explore your own generated index to figure out how to implement your sea

```bash
# Initial project setup
$ npm install
$ npm ci

# Build the project
$ npm run build
```

The custom element is created with [Create React App](https://create-react-app.dev/).
The integration is created with [Vite](https://vitejs.dev/).

## Contributors

Expand Down
4 changes: 2 additions & 2 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="utf-8" />
<title>Algolia Sync for Kontent.ai</title>
<!-- Kontent.ai Styling -->
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/kontent-ai-app-styles.css">
<link rel="stylesheet" type="text/css" href="/kontent-ai-app-styles.css">
<!-- Kontent.ai Custom elements API-->
<script src="https://app.kontent.ai/js-api/custom-element/v1/custom-element.min.js"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[build]
base = "/"
publish = "/build"
publish = "/dist"
command = "npm run build"
functions = "src/functions"
Loading

0 comments on commit a647dac

Please sign in to comment.