Skip to content

Commit

Permalink
Rewrite to Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriLojda committed Mar 28, 2024
1 parent 8f2a7af commit 7000a8a
Show file tree
Hide file tree
Showing 16 changed files with 2,858 additions and 13,615 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

23 changes: 23 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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",
],
},
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
};
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.DS_Store
node_modules
/dist

# testing
/coverage

# production
/build
dist
dist-ssr

# local env files
.env.local
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Netlify has made this easy. If you click the deploy button below, it will guide

### Running manually

The integration is created with [Create React App](https://create-react-app.dev/). First you will need to install npm dependencies with `npm install`. Then use `npm run build` to build the integration or `npm run start` to start a local development server. See https://create-react-app.dev/docs/available-scripts for more scripts.
The integration is created with [Vite](https://vitejs.dev/). First you will need to install npm dependencies with `npm ci`. Then use `npm run build` to build the integration or `npm run dev` to start a local development server.

## Cloudinary setup

Expand Down
17 changes: 17 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cloudinary Asset Selector</title>
<!-- kontent.ai styling -->
<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>
<script src="https://media-library.cloudinary.com/global/all.js"></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 7000a8a

Please sign in to comment.