Skip to content

Conversation

@HyunmoAhn
Copy link
Owner

Purpose

To install easily, you must build electron app.
So Setting about build for production.

Done

  • Build setting

Notice

  1. Need to bundling electron code about main.js. show

    • Electron-Builder doesn't support import in ES6. So, To using import feature, you must use webpack to bundling.
    • file bundled located /build folder at named main.js.
    • If you doesn't use import and use require, you may not do bundling.
  2. Change basic path for bundled path. show

    • Electron-Builder watch main path in package.json. Because We must use bundled code, change path from ./app/index.js to ./build/main.js.
  3. Change path for asset. show 1 show 2

    • Because bundling using webpack, index path is difference in development environment('/app/index.js') and production environment(/build/main.js)
    • So, different setting for path using process.env.NODE_ENV.
  4. Make electron-builder.yml for build setting. show

  5. Set script in package.json show

    • build: build for just make .exe or .dmg file.
    • build:page: build for /page, /app/index.js code using webpack.
    • pacakge: build for production build using github. This doesn't use alone. using release.sh together to set GH_TOKEN
  6. Make release.sh show

    • If you make release.sh to using github release automatically. This will be need to auto-update
    • You get GH_TOKENhere and setting then run ./release.sh!

Todo after

  • config about Auto Update.

- To show menu of app, Need to be showDockIcon is true.
- When activate app, tray menu will open.
`.icns` icon need to set icon in macOS.
@HyunmoAhn HyunmoAhn merged commit 9e591f9 into master Oct 27, 2018
@HyunmoAhn HyunmoAhn added the Reference Reference to initialize electron project label Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reference Reference to initialize electron project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants