Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
greyovo committed Feb 22, 2024
1 parent 523dbbd commit 6fe205a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 96 deletions.
76 changes: 70 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,81 @@
# Markditor

English | [简体中文](./README.zh-CN.mdss)
<center style="margin-bottom:10px">
<img src="./assets/logo.png" width="128px" />
<br>
English | <a href="./README.zh-CN.md">简体中文</a>
</center>

A WYSIWYG Markdown editor.
Yet another WYSIWYG Markdown editor written in TypeScript and Tauri. Aims to be an open-source alternative to Typora.

> ⚠️ Under active development. Only supports Windows 10/11 by now.
> **[Markditor]** = **[Mark]** down + e **[ditor]**.
> Supports Windows 10 / 11 by now.
> ⚠️ WIP. Be careful if you want to edit your important documents.
## Technology Stack

- React
- Tauri / Electron
- **Tauri** (preferred) / Electron
- Vditor (A forked version, see [here](https://github.com/greyovo/vditor))
- Zustand
- Radix
- Radix-UI
- Tailwind CSS
- Vite

## Download

Go to [releases](https://github.com/greyovo/MarkditorApp/releases) page.

## Project Architecture

```
├─build // Build assets used by electron-builder
├─dist // Web contents build output
├─dist-electron // Electron prebuilt files
├─electron // Electron main process
├─public // Public files to be used in HTML
├─release // Electron build output
├─shared // Shared types definitions between renderer and main processes
├─src // Front-end sources
│ ├─assets // Static assets, i.e., fonts
│ ├─components // Global components
│ ├─feat // Feature modules
│ ├─ipc // IPC communication
│ ├─store // Zustand stores and business logics
│ ├─types // Global type definitions
│ └─utils // Utility functions
└─src-tauri // Tauri backend process and build output
```

## Development

> Note: Markditor is initially made with Electron, **but currently Tauri is preferred.** So far Electron is still in development and has some unimplemented Platform API. See `electron/main/handler`
>
> By encapsulating IPC communication (see `shared/platform_api.d.ts` and `src/ipc`), Markditor can be easily migrated to other backends such as Tauri.
Install dependencies:

```bash
npm install
```

Run in dev mode:

```bash
# Run with Tauri (preferred)
npm run dev:tauri

# Run with Electron
npm run dev:electron
```

Build product:

```bash
# Build with Tauri (preferred)
npm run build:tauri

感谢TV感谢所有TV
# Build with Electron
npm run build:electron
```
90 changes: 0 additions & 90 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,91 +1 @@
## vite-react-electron

[![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite)
![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/vite-react-electron?color=fa6470)
![GitHub issues](https://img.shields.io/github/issues/caoxiemeihao/vite-react-electron?color=d8b22d)
![GitHub license](https://img.shields.io/github/license/caoxiemeihao/vite-react-electron)
[![Required Node.JS >= 14.18.0 || >=16.0.0](https://img.shields.io/static/v1?label=node&message=14.18.0%20||%20%3E=16.0.0&logo=node.js&color=3f893e)](https://nodejs.org/about/releases)

[English](README.md) | 简体中文

## 概述

📦 开箱即用
🎯 基于官方的 [template-react-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts), 低侵入性
🌱 结构清晰,可塑性强
💪 支持在渲染进程中使用 Electron、Node.js API
🔩 支持 C/C++ 模块
🖥 很容易实现多窗口

## 快速开始

```sh
# clone the project
git clone https://github.com/electron-vite/electron-vite-react.git

# enter the project directory
cd electron-vite-react

# install dependency
npm install

# develop
npm run dev
```

## 调试

![electron-vite-react-debug.gif](/electron-vite-react-debug.gif)

## 目录

*🚨 默认情况下, `electron` 文件夹下的文件将会被构建到 `dist-electron`*

```tree
├── electron Electron 源码文件夹
│ ├── main Main-process 源码
│ └── preload Preload-scripts 源码
├── release 构建后生成程序目录
│ └── {version}
│ ├── {os}-{os_arch} 未打包的程序(绿色运行版)
│ └── {app_name}_{version}.{ext} 应用安装文件
├── public 同 Vite 模板的 public
└── src 渲染进程源码、React代码
```

<!--
## 🚨 这需要留神
默认情况下,该模板在渲染进程中集成了 Node.js,如果你不需要它,你只需要删除下面的选项. [因为它会修改 Vite 默认的配置](https://github.com/electron-vite/vite-plugin-electron-renderer#config-presets-opinionated).
```diff
# vite.config.ts
export default {
plugins: [
...
- // Use Node.js API in the Renderer-process
- renderer({
- nodeIntegration: true,
- }),
...
],
}
```
-->

## 🔧 额外的功能

1. Electron 自动更新 👉 [阅读文档](src/components/update/README.zh-CN.md)
2. Playwright 测试

## ❔ FAQ

- [C/C++ addons, Node.js modules - Pre-Bundling](https://github.com/electron-vite/vite-plugin-electron-renderer#dependency-pre-bundling)
- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies)

## 🍵 🍰 🍣 🍟

<img width="270" src="https://github.com/caoxiemeihao/blog/blob/main/assets/$qrcode/$.png?raw=true">

0 comments on commit 6fe205a

Please sign in to comment.