Giter Site home page Giter Site logo

levi-li-yi / electron-vue3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from youliso/electron-template

0.0 1.0 0.0 20.77 MB

electron&vue3 多窗口模式的模板

License: MIT License

NSIS 0.55% JavaScript 12.49% HTML 0.20% TypeScript 72.54% Vue 10.29% SCSS 3.92%

electron-vue3's Introduction

electron-vue3

一个基于 electron & vue3 多窗口模式的模板

❗注意 nodejs => 14.17.0 vue \ vue-router 版本

引入依赖问题

  • 外部不会被打包进asar包内:
    所有外部依赖放入到 src/lib/extern
    调用 src/lib/index.tsgetExternPath() 方法可获取 调试和打包 对应路径

  • 内部 会被打包进asar包内:
    所有内部依赖放入到 src/lib/inside
    调用 src/lib/index.tsgetInsidePath() 方法可获取 调试和打包 对应路径

electron builder 打包配置

位于 build/cfg/build.js 根据自己需求更改即可
请参考 electron-builder 文档

模块大致文件结构参考

├── build 打包所需的文件
│   ├── cfg 打包配置
│   ├── icons 图片
│   └── script 打包的方法 、本地调试等
└── src
    ├── cfg 本地配置和 请求配置之类
    ├── lib 一些依赖方法(主、渲染可通用)
    │   ├── extern 外部依赖(打包后位于resources下)
    │   └── inside 内部依赖(如果开启asar打包 会位于asar下)
    ├── main 主进程模块
    └── renderer 渲染进程模块

安装中的网络问题

  • electron:
yarn config set electron_mirror https://cdn.npm.taobao.org/dist/electron/

运行调试

运行命令

yarn run dev

electron-vue3's People

Contributors

youliso avatar

Watchers

James Cloos 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.