Skip to content

Commit

Permalink
docs(guides): updated create-mini-app docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IVerhusha committed Oct 29, 2024
1 parent e1298ec commit 73a8ede
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 8 deletions.
36 changes: 32 additions & 4 deletions apps/docs/packages/telegram-apps-create-mini-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
</a>
</p>

CLI tool to scaffold your new mini application on the Telegram Mini Apps platform.
`@telegram-apps/create-mini-app` is a CLI tool designed to scaffold your new
mini application on the Telegram Mini Apps platform. It generates a project with pre-configured libraries and template files,
allowing you to customize the content based on your specific requirements.

## Usage

Expand All @@ -29,6 +31,32 @@ yarn create @telegram-apps/mini-app
```
:::

The tool will launch the project initialization process, prompting you with questions related to the
required technologies for your project and ultimately creating your project using some well-known
templates.
## Creating a New Application

The above command executes a script that guides you through the creation of
your application by sequentially prompting for the following information:

### 1. Project Directory Name

- **Prompt**: Enter the name of the folder where the project files will be located.

- **Default**: mini-app
The script will create a subfolder with the specified name in the current directory.

### 2. Preferred Technologies

| Option | Details |
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Language** | Choose between **TypeScript** or **JavaScript**. |
| **SDK Selection** | **• tma.js** [@telegram-apps/sdk](https://www.npmjs.com/package/@telegram-apps/sdk) <br/>A TypeScript library for seamless communication with Telegram Mini Apps functionality. <br/> **• Telegram SDK** [@twa-dev/sdk](https://www.npmjs.com/package/@twa-dev/sdk)<br/>This package allows you to work with the SDK as an npm package. |
| **Frameworks** | **• React.js** [template](https://github.com/Telegram-Mini-Apps/reactjs-template)<br/> **• Next.js** [template](https://github.com/Telegram-Mini-Apps/nextjs-template)<br/> **• Solid.js** [template](https://github.com/Telegram-Mini-Apps/solidjs-js-template)<br/> |

### 3. Git Remote Repository URL (Optional)

Enter the Git remote repository URL. This value will be used to connect the created project with your
remote Git repository. It should be either an HTTPS link or an SSH connection string.

## Build Configuration

Projects created with `create-mini-app` are configured to use the [Vite](https://vite.dev/) bundler. The project includes a `vite.config.js` file,
which you can customize to adjust the build settings according to your needs.
35 changes: 31 additions & 4 deletions packages/create-mini-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
[![docs-badge]][docs-link]
[![code-badge]][code-link]

CLI tool to scaffold your new mini application on the Telegram Mini Apps platform.
`@telegram-apps/create-mini-app` is a CLI tool designed to scaffold your new
mini application on the Telegram Mini Apps platform. It generates a project with pre-configured libraries and template files, allowing you to customize the content based on your specific requirements.

## Usage

Expand All @@ -33,6 +34,32 @@ yarn create @telegram-apps/mini-app
pnpm dlx @telegram-apps/create-mini-app
```

The tool will launch the project initialization process, prompting you with questions related to the
required technologies for your project and ultimately creating your project using some well-known
templates.
## Creating a New Application

The above command executes a script that guides you through the creation of
your application by sequentially prompting for the following information:

### 1. Project Directory Name

- **Prompt**: Enter the name of the folder where the project files will be located.

- **Default**: mini-app
The script will create a subfolder with the specified name in the current directory.

### 2. Preferred Technologies

| Option | Details |
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Language** | Choose between **TypeScript** or **JavaScript**. |
| **SDK Selection** | **• tma.js** [@telegram-apps/sdk](https://www.npmjs.com/package/@telegram-apps/sdk) <br/>A TypeScript library for seamless communication with Telegram Mini Apps functionality. <br/> **• Telegram SDK** [@twa-dev/sdk](https://www.npmjs.com/package/@twa-dev/sdk)<br/>This package allows you to work with the SDK as an npm package. |
| **Frameworks** | **• React.js** [template](https://github.com/Telegram-Mini-Apps/reactjs-template)<br/> **• Next.js** [template](https://github.com/Telegram-Mini-Apps/nextjs-template)<br/> **• Solid.js** [template](https://github.com/Telegram-Mini-Apps/solidjs-js-template)<br/> |

### 3. Git Remote Repository URL (Optional)

Enter the Git remote repository URL. This value will be used to connect the created project with your
remote Git repository. It should be either an HTTPS link or an SSH connection string.

## Build Configuration

Projects created with `create-mini-app` are configured to use the *Vite* bundler. The project includes a `vite.config.js` file,
which you can customize to adjust the build settings according to your needs.

0 comments on commit 73a8ede

Please sign in to comment.