DEV Community

Cover image for Quickly scaffolding an Electron project in 1 min
Alex Wei
Alex Wei

Posted on • Edited on

Quickly scaffolding an Electron project in 1 min

create-electron

An easy way to start an Electron project

The link - https://github.com/.../create-electron


Usage

Compatibility Note:
Some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.

With npm:

$ npm create @quick-start/electron
Enter fullscreen mode Exit fullscreen mode

With Yarn:

$ yarn create @quick-start/electron
Enter fullscreen mode Exit fullscreen mode

With pnpm:

$ pnpm create @quick-start/electron
Enter fullscreen mode Exit fullscreen mode

Then follow the prompts!

You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold an Electrn + Vue project, run:

# npm 6.x
npm create @quick-start/electron my-app --template vue

# npm 7+, extra double-dash is needed:
npm create @quick-start/electron my-app -- --template vue

# yarn
yarn create @quick-start/electron my-app --template vue

# pnpm
pnpm create @quick-start/electron my-app -- --template vue
Enter fullscreen mode Exit fullscreen mode

Currently supported template presets include:

  • sample
  • sample-ts
  • vue
  • vue-ts
  • react
  • react-ts
  • svelte
  • svelte-ts

Features

  • Use ESLint + Prettier to better lint and style your code, help you to write high-quality code.
  • Use electron-vite compiler, a fast javascript builder integrated with Vite, and you don't need to care about configuration.
  • Use electron-toolkit that make you easy to develop. For example: TSconfigs extends, expose common Electron APIs to renderer process in preload scripts and effective utils for main process.
  • Use electron-builder and preset common configuration, allows you to easily pack Electron app.
  • Use electron-updater for auto-update, based on electron-builder.

The link - https://github.com/.../create-electron

Top comments (0)