Build Setting for production #7
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
To install easily, you must build electron app.
So Setting about build for production.
Done
Notice
Need to bundling electron code about
main.js. showElectron-Builderdoesn't supportimportin ES6. So, To usingimportfeature, you must usewebpackto bundling./buildfolder at namedmain.js.importand userequire, you may not do bundling.Change basic path for bundled path. show
Electron-Builderwatch main path inpackage.json. Because We must use bundled code, change path from./app/index.jsto./build/main.js.Change path for asset. show 1 show 2
webpack, index path is difference in development environment('/app/index.js') and production environment(/build/main.js)process.env.NODE_ENV.Make
electron-builder.ymlfor build setting. showSet script in
package.jsonshowbuild: build for just make.exeor.dmgfile.build:page: build for/page,/app/index.jscode usingwebpack.pacakge: build for production build using github. This doesn't use alone. usingrelease.shtogether to setGH_TOKENMake
release.shshowrelease.shto using github release automatically. This will be need to auto-updateGH_TOKENhere and setting then run./release.sh!Todo after