Coder Social home page Coder Social logo

electron-pomodoro-jason's Introduction

Electron-Pomodoro-Jason

个人使用的番茄钟, electron + vue.js + parcel 构建

使用说明

  • 开发调试

需要修改parcel 包下 reload 模块的源码, 屏蔽启用WebSocket的地方


npm install -g parcel-bundler

# 实时编译js
npm run dev

# 开启调试 electron 
npm start

  • 正式包
# 打包js
npm run buildjs
# 打包windows, 打包后位于 ./OutApp 目录下
npm run package

代码说明

  • src/webIpc 下面的目录是不通过parcel打包的, 可以使用渲染进程的公共模块,并且负责和main进程通信,全局调用的方式为webIpc.foo()
  • src/renderer/entry.js 为vue代码的入口,需要通过parcel src/renderer/entry.js打包到dist/目录
  • index.html中会直接引入src/webIpc/index.jsdist/entry.js,dist/entry.css

这种方式并不是很好,是目前的折中方式,因为parcel打包时会将渲染进程内的process变量编译为let process = require('process'), 无法正常使用了,目前没有深究原因

TODO:

  • play mp3 audio
  • 最小化到托盘时 快捷菜单
  • [] setting page
  • [] 长时间休息,长休间隔,长休提示
  • [] audio select
  • [] 自动更新到最新版本
  • [] 背景图片,切换?
  • [] 历史记录
  • [] 信息反馈

build

  • TODO: electron-builder 无法将dist 打包进去

  • 生成 package 目录但是没有打包为一个文件 npm run pack

  • 生成一个 exe 或者 dmg 文件 npm run dist

  • 指定平台和架构

# windows 64bit
electron-builder --win --x64
# windows and mac 32bit
electron-builder --win --mac --ia32

electron-pomodoro-jason's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

zsytssk

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.