Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Setting for production #7

Merged
merged 4 commits into from Oct 27, 2018

Conversation

@HyunmoAhn
Copy link
Owner

commented Oct 27, 2018

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.
HyunmoAhn added 4 commits Oct 27, 2018
Fix for usability.
- To show menu of app, Need to be showDockIcon is true.
- When activate app, tray menu will open.
Add icon for production build.
`.icns` icon need to set icon in macOS.

@HyunmoAhn HyunmoAhn merged commit 9e591f9 into master Oct 27, 2018

@HyunmoAhn HyunmoAhn added the Reference label Oct 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.