百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

template-electron-installation

> 编程语言
开源

使用 Electron 在亭式模式下制作媒体艺术装置的模板

200 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

使用 Electron 在亭式模式下制作媒体艺术装置的模板

template-electron-installation

A bare-bones Electron setup for web-based media art & installations.

See the canvas-sketch branch for a modified version of this repo that is a little more iterative (hot reloading and so on).

Git clone this repo, then:

cd template-electron-installation

# install deps
npm install

Now you can do the following:

# Test the app with a local server, i.e. pure browser
npm run serve

# Test the app with Electron locally
npm run app

# Bundle the Electron app for 64-bit macOS + Windows
# It will install some dependencies on first run
npm run packager

# Once packaged, you can run this to zip it up
npm run zip

Kiosk + Hotkeys

The Electron app runs in kiosk fullscreen mode and comes setup with the following hotkeys:

  • Quit: Cmd/Ctrl + W or Cmd/Ctrl + Q
  • Reload: Cmd/Ctrl + R
  • Toggle Kiosk/Fullscreen Mode: Cmd/Ctrl + F

Config

See ./src/config.js for a couple boot options.

Packaging Windows + Mac

If you are in control of the installation you might rather just run it locally with npm run app — but an EXE/APP executable is handy if you are passing the installation off to a remote team. You can change the output name with productName in ./package.json.

I run these commands from a macOS computer. You'll need wine installed via homebrew to generate Windows builds. Or, you can modify the package.json script to only generate a specific build target. See electron-packager for details.

Tips

If you have files or folders in your project repo that you don't want copied over, make sure to --ignore those in the electron-packager script.

You can also speed up build time by using --platform=win32,darwin --arch=ia32,x64 instead of --all, if you only want to build for EXE/APP.

Another thing is to move all of your client-side (HTML/JS) dependencies to devDependencies in package.json, and only include modules that you actually require in src/app.js (currently the template doesn't require any additional modules). This will lead to a smaller output size.

License

MIT, see LICENSE.md for details.

Issues· 10 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言