Skip to content

Commit

Permalink
GITBOOK-1: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbook-bot committed Nov 10, 2023
1 parent 36d4eaa commit 6fd59fb
Show file tree
Hide file tree
Showing 23 changed files with 106 additions and 118 deletions.
110 changes: 50 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
# Hayde

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
[![GitHub](https://img.shields.io/github/license/sly777/hayde)](https://github.com/sly777/hayde/blob/main/LICENSE)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/sly777/hayde)](https://github.com/sly777/hayde/pulse)
[![GitHub last commit](https://img.shields.io/github/last-commit/sly777/hayde)](https://github.com/sly777/hayde/commits/main)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Sly777_hayde&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Sly777_hayde)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Sly777_hayde&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Sly777_hayde)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Sly777_hayde&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Sly777_hayde)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Sly777_hayde&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Sly777_hayde)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Sly777_hayde&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Sly777_hayde)
[![Known Vulnerabilities](https://snyk.io/test/github/Sly777/hayde/badge.svg)](https://snyk.io/test/github/Sly777/hayde)
[![npm version](https://badge.fury.io/js/hayde.svg)](https://badge.fury.io/js/hayde)
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=Sly777_hayde)](https://sonarcloud.io/summary/new_code?id=Sly777_hayde)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code\_of\_conduct.md) [![GitHub](https://img.shields.io/github/license/sly777/hayde)](https://github.com/sly777/hayde/blob/main/LICENSE) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/sly777/hayde)](https://github.com/sly777/hayde/pulse) [![GitHub last commit](https://img.shields.io/github/last-commit/sly777/hayde)](https://github.com/sly777/hayde/commits/main) [![Reliability Rating](https://sonarcloud.io/api/project\_badges/measure?project=Sly777\_hayde\&metric=reliability\_rating)](https://sonarcloud.io/summary/new\_code?id=Sly777\_hayde) [![Vulnerabilities](https://sonarcloud.io/api/project\_badges/measure?project=Sly777\_hayde\&metric=vulnerabilities)](https://sonarcloud.io/summary/new\_code?id=Sly777\_hayde) [![Security Rating](https://sonarcloud.io/api/project\_badges/measure?project=Sly777\_hayde\&metric=security\_rating)](https://sonarcloud.io/summary/new\_code?id=Sly777\_hayde) [![Maintainability Rating](https://sonarcloud.io/api/project\_badges/measure?project=Sly777\_hayde\&metric=sqale\_rating)](https://sonarcloud.io/summary/new\_code?id=Sly777\_hayde) [![Lines of Code](https://sonarcloud.io/api/project\_badges/measure?project=Sly777\_hayde\&metric=ncloc)](https://sonarcloud.io/summary/new\_code?id=Sly777\_hayde) [![Known Vulnerabilities](https://snyk.io/test/github/Sly777/hayde/badge.svg)](https://snyk.io/test/github/Sly777/hayde) [![npm version](https://badge.fury.io/js/hayde.svg)](https://badge.fury.io/js/hayde) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/) [![Quality gate](https://sonarcloud.io/api/project\_badges/quality\_gate?project=Sly777\_hayde)](https://sonarcloud.io/summary/new\_code?id=Sly777\_hayde)

Hayde is a CLI tool that allows you to create React components quickly and easily. With Hayde, you can focus on writing code instead of setting up boilerplate files.

<img src="https://github.com/Sly777/hayde/assets/694940/32e70b96-ed25-4897-95c4-76b7500bd925" width="300" alt="Hayde Quick Start" />
![Hayde Quick Start](https://github.com/Sly777/hayde/assets/694940/32e70b96-ed25-4897-95c4-76b7500bd925)

## Quick Start

Expand All @@ -35,41 +23,43 @@ If you want to install Hayde locally, you can run the following command:
```bash
npm install hayde --save-dev
```

or

```bash
yarn add hayde --dev
```

## Features

- **Quick and Easy** 🚀 - Hayde allows you to create React components quickly and easily. With Hayde, you can focus on writing code instead of setting up boilerplate files.
- **Clean DX** ⭐ - Hayde is designed to be as simple as possible. It doesn't require any configuration or setup, so you can start using it right away. It's built with TypeScript.
- **Customizable** 🪄 - Hayde is highly customizable. You can configure it to suit your needs and preferences.
- **Modular** 🧩 - Hayde is modular. You can use it with any React project (create-react-app, next.js, astro, ...etc.), regardless of its size or complexity. Also it's easy to extend Hayde with new features.
- **No Installation Required** 📦 - Hayde doesn't require any installation. You can use it right away without having to install anything.
- **Auto Import** ⏩ - Hayde automatically imports your components into your project if you want. You just need to add tags into target file and voila! You can check it on [BuilderIO](./src/features/builderIO/) integration.
- **AI Support** 🤖 - Hayde supports AI tools such as OpenAI (gpt-3.5 & gpt-4) and Ollama. You can create your components with AI easily! You can check it on [AI](./src/features/AI/) integration. **It also supports GPT-4 Vision with URL and File Upload!**
* **Quick and Easy** 🚀 - Hayde allows you to create React components quickly and easily. With Hayde, you can focus on writing code instead of setting up boilerplate files.
* **Clean DX** ⭐ - Hayde is designed to be as simple as possible. It doesn't require any configuration or setup, so you can start using it right away. It's built with TypeScript.
* **Customizable** 🪄 - Hayde is highly customizable. You can configure it to suit your needs and preferences.
* **Modular** 🧩 - Hayde is modular. You can use it with any React project (create-react-app, next.js, astro, ...etc.), regardless of its size or complexity. Also it's easy to extend Hayde with new features.
* **No Installation Required** 📦 - Hayde doesn't require any installation. You can use it right away without having to install anything.
* **Auto Import** ⏩ - Hayde automatically imports your components into your project if you want. You just need to add tags into target file and voila! You can check it on [BuilderIO](src/features/builderIO/) integration.
* **AI Support** 🤖 - Hayde supports AI tools such as OpenAI (gpt-3.5 & gpt-4) and Ollama. You can create your components with AI easily! You can check it on [AI](src/features/AI/) integration. **It also supports GPT-4 Vision with URL and File Upload!**

## Table of Contents

- [Hayde](#hayde)
- [Quick Start](#quick-start)
- [Local Installation](#local-installation)
- [Features](#features)
- [Table of Contents](#table-of-contents)
- [Settings](#settings)
- [Profiles](#profiles)
- [Examples](#examples)
- [Supported Libraries on Component Creation](#supported-libraries-on-component-creation)
- [NPM Scripts](#npm-scripts)
- [CLI Arguments](#cli-arguments)
- [How to create custom plugin](#how-to-create-custom-plugin)
- [Contributing](#contributing)
- [License](#license)
* [Hayde](./#hayde)
* [Quick Start](./#quick-start)
* [Local Installation](./#local-installation)
* [Features](./#features)
* [Table of Contents](./#table-of-contents)
* [Settings](./#settings)
* [Profiles](./#profiles)
* [Examples](./#examples)
* [Supported Libraries on Component Creation](./#supported-libraries-on-component-creation)
* [NPM Scripts](./#npm-scripts)
* [CLI Arguments](./#cli-arguments)
* [How to create custom plugin](./#how-to-create-custom-plugin)
* [Contributing](./#contributing)
* [License](./#license)

## Settings

There are two options for running Hayde. Just simply run `npx hayde` or You can also run Hayde with `.hayde.json` file. This file allows you to specify default options for Hayde.
There are two options for running Hayde. Just simply run `npx hayde` or You can also run Hayde with `.hayde.json` file. This file allows you to specify default options for Hayde.

Here's an example of what the .hayde.json file might look like:

Expand Down Expand Up @@ -114,7 +104,7 @@ After creating `.hayde.json` file, you can run Hayde with the following command:
npx hayde
```

For more information on the available options, please check the [options](./docs/options.md) page.
For more information on the available options, please check the [options](docs/options.md) page.

## Profiles

Expand All @@ -126,42 +116,42 @@ npx hayde --profile ai

## Examples

For Examples, please check the [examples](./examples) folder. You can just copy JSON files from this folder and paste to root folder of your project. Then you can just run Hayde. Some examples are;
For Examples, please check the [examples](examples/) folder. You can just copy JSON files from this folder and paste to root folder of your project. Then you can just run Hayde. Some examples are;

- [React Component with Chakra UI](./examples/with-react-chakraui.json)
- [React Component with Material UI](./examples/with-react-materialui.json)
- [Component with AI (OpenAI GPT-4)](./examples/with-openai-gpt-4.json)
- [Using Ollama with llama2](./examples/with-ollama-llama2.json)
- [Component with AI Image Recognition (OpenAI GPT-4 Vision)](./examples/with-openai-vision.json)
* [React Component with Chakra UI](examples/with-react-chakraui.json)
* [React Component with Material UI](examples/with-react-materialui.json)
* [Component with AI (OpenAI GPT-4)](examples/with-openai-gpt-4.json)
* [Using Ollama with llama2](examples/with-ollama-llama2.json)
* [Component with AI Image Recognition (OpenAI GPT-4 Vision)](examples/with-openai-vision.json)

You can find more examples in the [examples](./examples) folder.
You can find more examples in the [examples](examples/) folder.

## Supported Libraries on Component Creation

You can create React components with the following libraries, you just need to add the library name to the plugins array in the `.hayde.json` file.

- [Chakra UI](https://chakra-ui.com/) - [Source](./src/features/chakraUI/)
- [Material UI](https://material-ui.com/) - [Source](./src/features/materialUI/)
- [Emmet](https://emmet.io/) - [Source](./src/features/emmet/)
- [Storybook](https://storybook.js.org/) - [Source](./src/features/storybook/)
- [Builder.io](https://www.builder.io/) - [Source](./src/features/builderIO/)
- [React.js](https://reactjs.org/) - [Source](./src/features/reactJS/)
- CSS and SCSS support - [Source](./src/features/css/)
- [TypeScript](https://www.typescriptlang.org/)
- [OpenAI](https://platform.openai.com) - [Source](./src/features/AI/)
- [Ollama](https://ollama.ai) - [Source](./src/features/AI/)
* [Chakra UI](https://chakra-ui.com/) - [Source](src/features/chakraUI/)
* [Material UI](https://material-ui.com/) - [Source](src/features/materialUI/)
* [Emmet](https://emmet.io/) - [Source](src/features/emmet/)
* [Storybook](https://storybook.js.org/) - [Source](src/features/storybook/)
* [Builder.io](https://www.builder.io/) - [Source](src/features/builderIO/)
* [React.js](https://reactjs.org/) - [Source](src/features/reactJS/)
* CSS and SCSS support - [Source](src/features/css/)
* [TypeScript](https://www.typescriptlang.org/)
* [OpenAI](https://platform.openai.com) - [Source](src/features/AI/)
* [Ollama](https://ollama.ai) - [Source](src/features/AI/)

## NPM Scripts

You can call any script you want before or after component creation! For NPM Scripts, please check the [npm scripts](./docs/npm-scripts.md) page.
You can call any script you want before or after component creation! For NPM Scripts, please check the [npm scripts](docs/npm-scripts.md) page.

## CLI Arguments

For CLI Arguments, please check the [CLI arguments](./docs/cli-arguments.md) page.
For CLI Arguments, please check the [CLI arguments](docs/cli-arguments.md) page.

## How to create custom plugin

For creating custom plugin, please check the [custom plugin](./docs/how-to-create-custom-plugin.md) page. You can create your own libraries' plugin easily with extensive functionality and [Handlebars](https://handlebarsjs.com/) template engine.
For creating custom plugin, please check the [custom plugin](docs/how-to-create-custom-plugin.md) page. You can create your own libraries' plugin easily with extensive functionality and [Handlebars](https://handlebarsjs.com/) template engine.

Also; you can create your hayde plugin with hayde. Just update your `.hayde.json` file like below:

Expand All @@ -181,10 +171,10 @@ npx hayde

## Contributing

If you'd like to contribute to Hayde, please check the [contributing](./docs/contributing.md) page. Contributions are always welcome!
If you'd like to contribute to Hayde, please check the [contributing](docs/contributing.md) page. Contributions are always welcome!

If you want to integrate your library/plugin/boilerplate to Hayde, please check the [how to create custom plugin](./docs/how-to-create-custom-plugin.md) page.
If you want to integrate your library/plugin/boilerplate to Hayde, please check the [how to create custom plugin](docs/how-to-create-custom-plugin.md) page.

## License

Distributed under the GPL-3.0 License. See [LICENSE](LICENSE) for more information.
Distributed under the GPL-3.0 License. See [LICENSE](LICENSE/) for more information.
36 changes: 18 additions & 18 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Table of contents

* [Hayde](README.md)
* [docs](docs/README.md)
* [brand-colors](docs/brand-colors.md)
* [♥ Features](features/README.md)
* [AI module](features/AI.md)
* [Builder.IO module](features/builderIO.md)
* [Chakra UI module](features/chakraUI.md)
* [Create Plugin module](features/createPlugin.md)
* [CSS module](features/css.md)
* [emmet](features/emmet.md)
* [General module](features/general.md)
* [Material UI module](features/materialUI.md)
* [React.js module](features/reactJS.md)
* [Storybook module](features/storybook.md)
* [📔 Documentation](docs/README.md)
* [CLI Arguments](docs/cli-arguments.md)
* [Options](docs/options.md)
* [Profiles](docs/profiles.md)
* [NPM script trigger](docs/npm-scripts.md)
* [How to Create Custom Plugin](docs/how-to-create-custom-plugin.md)
* [Contributor Covenant Code of Conduct](docs/contributing.md)
* [how-to-create-custom-plugin](docs/how-to-create-custom-plugin.md)
* [NPM Feature](docs/npm-scripts.md)
* [Hayde | Options](docs/options.md)
* [Examples](examples/readme.md)
* [src](src/README.md)
* [features](src/features/README.md)
* [AI module](src/features/AI/readme.md)
* [Builder.IO module](src/features/builderIO/readme.md)
* [Chakra UI module](src/features/chakraUI/readme.md)
* [Create Plugin module](src/features/createPlugin/readme.md)
* [CSS module](src/features/css/readme.md)
* [emmet](src/features/emmet/readme.md)
* [General module](src/features/general/readme.md)
* [Material UI module](src/features/materialUI/readme.md)
* [React.js module](src/features/reactJS/readme.md)
* [Storybook module](src/features/storybook/readme.md)
* [🚀 Examples](examples/readme.md)
* [Source Code](src.md)
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# docs
# 📔 Documentation

5 changes: 0 additions & 5 deletions docs/brand-colors.md

This file was deleted.

16 changes: 8 additions & 8 deletions docs/cli-arguments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## CLI Arguments
# CLI Arguments

The following arguments are available for the CLI:

| Argument | Description |
| --------------------- | -------------------------------------------- |
| `--help` | Show help |
| `--debug` | Output extra debugging |
| `--noFormat` | Disable formatting on file content |
| `--disableTelemetry` | disable telemetry (it's not implemented yet) |
| `--profile <profile>` | use a specific profile |
| Argument | Description |
| --------------------- | ---------------------------------------------------------------- |
| `--help` | Show help |
| `--debug` | Output extra debugging |
| `--noFormat` | Disable formatting on file content |
| `--disableTelemetry` | disable telemetry (it's not implemented yet) |
| `--profile <profile>` | use a specific profile (`--profile ai` to call `.hayde-ai-json`) |
21 changes: 11 additions & 10 deletions docs/how-to-create-custom-plugin.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## How to Create Custom Plugin
# How to Create Custom Plugin

# WIP
### (WIP)

Plugins are the way to extend the functionality of the framework. You can create your own plugins and use them in your projects.
Plugins are a way to extend the functionality of the framework. You can create your own plugins and use them in your projects.

## Plugin Structure
### Plugin Structure

A plugin is a folder with the following structure:

Expand All @@ -14,9 +14,9 @@ plugin-name
├── package.json
```

## Create Plugin with Hayde?!
### How easy is it to create a Plugin with Hayde

You can also create your plugin with Hayde. First; you need to create `.hayde.json` file in your project root. And then add `createPlugin` **only** to the plugins array.
You can also create your plugin with Hayde. First, you need to create `.hayde.json` file in your project root. Then, add `createPlugin` **only** to the plugins array.

```json
{
Expand All @@ -32,9 +32,10 @@ After that, you can run the following command to create your plugin.
npx hayde
```

### index.js
#### index.js

This file is the entry point of the plugin. It should export;
- `pluginName`: Name of the plugin
- `initPlugin`: Init function of the plugin
- `runPlugin`: Run function of the plugin after everything is ready to go for parsing the component

* `pluginName`: Name of the plugin
* `initPlugin`: Init function of the plugin
* `runPlugin`: Run function of the plugin after everything is ready to go for parsing the component
12 changes: 2 additions & 10 deletions docs/options.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
# Hayde | Options
# Options

## Usage

Please create a new json file called `.hayde.json` in your project root. This file will be used to configure the Hayde.

## Profiles

If you want to have multiple `.hayde` file, you can just create the file with your profile. For example; you can create two files called `.hayde.json` and `.hayde.ai.json`. And then you can run the following command to use the `.hayde.ai.json` file.

```bash
npx hayde --profile ai
```

## Example

Please check the example below to see how to configure the Hayde or you can check the [example file](../.hayde.json) in this repository. You can also find examples in the [examples](../examples) folder.
Please check the example below to see how to configure the Hayde or you can check the [example file](../.hayde.json) in this repository. You can also find examples in the [examples](../examples/) folder.

```json
{
Expand Down
7 changes: 7 additions & 0 deletions docs/profiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Profiles

If you want to have multiple `.hayde` file, you can just create the file with your profile. For example, you can create two files called `.hayde.json` and `.hayde.ai.json`. Then, you can run the following command to use the `.hayde.ai.json` file.

```bash
npx hayde --profile ai
```
6 changes: 4 additions & 2 deletions examples/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## Examples
# 🚀 Examples

You can just copy JSON files from this folder and paste to root folder of your project. Then you can run Hayde with the following command:
You can just copy JSON files from [Examples](https://github.com/Sly777/hayde/tree/main/examples) folder and paste any of them to the root folder of your project. Then you can run Hayde with the following command:

```bash
npx hayde
```

For more information on the available options, please check the [options](../docs/options.md) page.

Click here to see the [GitHub](https://github.com/Sly777/hayde/tree/main/examples) page.
File renamed without changes.
2 changes: 2 additions & 0 deletions features/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ♥ Features

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6fd59fb

Please sign in to comment.