Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-lab

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-lab

Electron 的研发脚手架,包含开发、构建脚本和对应的运行时 API。

  • 0.1.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
increased by325%
Maintainers
2
Weekly downloads
 
Created
Source

Electron Lab

Electron 的研发脚手架,包含开发、构建脚本和对应的运行时 API。

$ npm install electron-lab --save

使用命令行脚本

使用 NPX

$ npx el start
$ npx el build

使用 packages.json

{
  "scripts": {
    "start": "el start",
    "build": "el build"
  }
}

参数

start
参数含义默认值示例
--inspect主进程 debug 的 inspect 端口$ el start --inspect=3999
--port渲染进程 dev server 端口$ el start --port=4001
build
参数含义默认值示例
--output打包输出路径./dist$ el build --output=./some-dir
额外的脚手架配置

主进程和渲染进程都使用 webpack 打包,app 使用 electron-builder 打包,可以根据自己的需要增加额外一些配置。存放路径都在项目的根目录。

默认配置可以查看 node_modules/electron-lab/config

说明路径
主进程额外配置main.webpack.config.js
渲染进程额外配置renderer.webpack.config.js
builder 配置electron-builder.config.js

使用运行时 API

import el from 'electron-lab';

el.getEntry(entry?:string): string

参数说明默认值
entry入口名称"index"

el.openSubWindow(options:BrowserWindowConstructorOptions & { entry: string }): BrowserWindow

参数说明默认值
options启动子窗口的参数-

FAQs

Package last updated on 19 Nov 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc