Socket
Socket
Sign inDemoInstall

electron-dev-runner

Package Overview
Dependencies
47
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    electron-dev-runner

electron development run environment


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

electron-dev-runner

LICENSE npm (scoped)

一个在Electron开发环境使用的启动工具。

支持功能:

  • 监听主进程文件变化自动重启electron
  • 支持 TS 入口文件启动
  • 支持配置自动启动 Vite

Install

npm install electron-dev-runner -D
# or
yarn add electron-dev-runner - D

Usage

修改package.jsonscripts

{
  "scripts" : {
    "dev": "electron-dev-runner src/main/index.ts --vite"
  }
}

Command Options

electron-dev-runner <file>

参数说明:

  • file: 主进程启动入口文件;
  • -w: 要监听的文件夹,默认为主进程启动文件所在的文件夹;例如:-w src/main
  • -ots编译输出目录,等同于tsoutDir, 默认为dist/main
  • -tts指定ECMAScript目标版本,等同于tstarget,默认为ES5
  • -pts指定的tsconfig.json配置文件或文件夹,如果指定了此参数,file-o-t视为无效。
  • --vite: 是否默认启动vite,如果添加了此参数,会使用vite启动渲染进程。

License

MIT

Keywords

FAQs

Last updated on 06 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc