Giter VIP home page Giter VIP logo

markdowneditor's Introduction

⚡️ vite electron esbuild starter

⚡️

Chinese

The electron project stater using vite for renderer process and esbuild / tsc for main process.

React demo with antd is available here (Automatic style introduction has been configured. Vite supports on-demand loading by default): antd branch

Note: CSC_IDENTITY_AUTO_DISCOVERY is set to false by default to avoid the codesign operation in packaging macos (learn more: codesign)

Usage

Create a Project:

  • Clone this project directly.
  • If you use GitHub, click Use this template at the top of the page or here (do not check include all branch)

Installation dependencies

yarn

Start local development

# Use esbuild to compile the main process Typescript, which is faster
yarn run dev

# Use tsc to compile the main process Typescript
yarn run dev:tsc

You can also use dev:main, dev:main:tsc, and dev:renderer separately to debug the main process and the rendering process separately.

Compile/Pack

# Only build the target code and resources of the main process and the rendering process, without packaging (exe, dmg, etc.)
yarn run build

# Preview your application in production mode without pack.
yarn run preview

# Build and pack as a runnable program or installer
yarn run pack:win
yarn run pack:mac
yarn run pack:linux

# Pack for all platforms
yarn run pack # Exclude mac platform, applicable to linux & win
yarn run pack:all

Clean up the build directory

yarn run clean

Screenshot

screenshot

File structure

Use two-package-structure

+ app                     electron-builder app directory and its build product directory (target js code, image resources, etc., instead of installation packages or executable files)
  - package.json          Production dependencies, all stored as dependencies (not devDependencies)
+ dist                    electron-builder package directory
+ scripts                 Support scripts for development/build.
+ src      
  + common                common code
  + main                  for main process
  + renderer              for renderer process
- package.json            Dependencies during development, all stored as devDependencies (not dependencies)
- vite.config.ts          vite configurations
- electron-builder.yml    electron-builder configurations

markdowneditor's People

Contributors

alduinleung avatar

Stargazers

Alexander avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.