Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pokornyd committed Oct 25, 2024
1 parent f32a3db commit 1d11471
Showing 1 changed file with 24 additions and 41 deletions.
65 changes: 24 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,33 @@
# React + TypeScript + Vite
# Kontent.ai DataOps interface

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
> [!IMPORTANT]
> This tool is currently under development. Some DataOps features can result in irreversible changes to your Kontent.ai environment, make sure you familiarize yourself with [data-ops CLI documentation](https://github.com/kontent-ai/data-ops) and use the tool at your own risk.
>
> Currently available features:
> * syncModel > run (only between environments)
Currently, two official plugins are available:
## About

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
A React GUI layer on top of the [data-ops CLI](https://github.com/kontent-ai/data-ops). Aims to provide the same level of functionality through a user-friendly interface. All features are documented in the CLI repository.

## Expanding the ESLint configuration
## Running and deployment

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
You can run the tool either locally or deploy it to Netlify, using a quick deployment option described below.

- Configure the top-level `parserOptions` property like this:
### Running locally

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```
Clone the repository and install all dependencies, then start the local development server.

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```
npm i
npm run dev:functions
```


### Quick Deploy on Netlify

Clicking on the below button will guide you through the deployment process and also create a copy of the repository in your account.

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/kontent-ai/data-ops-gui/)

The tool makes use of Netlify functions to invoke `data-ops` methods. Deployment on other platforms requires adjustment to the API layer.

0 comments on commit 1d11471

Please sign in to comment.