GithubHelp home page GithubHelp logo

xieerduos / electron-template Goto Github PK

View Code? Open in Web Editor NEW
39.0 2.0 21.0 8.88 MB

electron template,快速开发electron项目。

Home Page: https://docs.ffffee.com

License: MIT License

JavaScript 98.07% Shell 0.03% HTML 0.77% Vue 0.97% CSS 0.15%
electron-template electron-vue3 electron electron-app electron-vue electron-vue-webpack vue-cli-electron-builder

electron-template's Introduction

Electron Template

Electron Template 是一个基于 vue-cli-plugin-electron-builder 框架的开源项目模板。

基于该模版开发的项目案例

electron + vue3 + element-plus + pinia: https://github.com/xieerduos/electron-ffmpeg-video-to-gif

快速开始

安装项目依赖

npm install

安装过程中遇到问题?

npm install --ignore-engines --legacy-peer-deps

启动项目

npm start

打包构建

npm run electron:build

代码检查和修复

npm run lint

自定义配置

Vue Cli https://cli.vuejs.org/config/

vue-cli-plugin-electron-builder https://github.com/nklayman/vue-cli-plugin-electron-builder

生成图标

https://www.npmjs.com/package/electron-icon-builder

把 public/logo.png 换成你自己的,运行下面命令

npm run logo

Electron Mac 系统托盘图标失真问题electron-mac-tray-icon-distortion.md

常见问题

遇到问题了?可以先看看这里docs/FrequentlyAskedQuestions.md有没有答案

License

Copyright (c) 李钟意.

Licensed under the MIT license.

electron-template's People

Contributors

xieerduos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

electron-template's Issues

在主线程中不能使用在class 中声明成员,运行报错

示例:
// src/main/background.js
class MyClass {
name = '';
constructor() {
this.name = '123';
}
}
const my1 = new MyClass();
console.log('output->my1', my1);

//运行报错
// yarn electron:build

ERROR Failed to compile with 1 errors 14:49:34

error in ./src/main/background.js

Module parse failed: Unexpected token (144:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| class MyClass {

name = '';
| constructor() {
| this.name = '123';

@ multi ./src/main/background.js

ERROR Build failed with errors.
error Command failed with exit code 1.

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.