Quick electron getting started guide...
mkdir my-electro
cd my-electro
npm init -y
npm i -ED electron
touch index.html
touch main.js # app main entry point
your package.json
file:
{
"main": "main.js",
"scripts": {
"start": "electron ."
}
}
npm start
install packager
npm i -ED electron-packager
add scripts
vi package.json
{
"scripts": {
"start": "electron .",
"build": "npm-run-all package:*",
"package:mac": " electron-packager . electron-tutorial-app --overwrite --asar --platform=darwin --arch=x64 --prune=true --out=dist --version-string.CompanyName=daggerok --version-string.FileDescription=UA --version-string.ProductName=\"MyElectro\"",
"package:linux": "electron-packager . electron-tutorial-app --overwrite --asar --platform=linux --arch=x64 --prune=true --out=dist --version-string.CompanyName=daggerok --version-string.FileDescription=UA --version-string.ProductName=\"MyElectro\""
"zip": "for i in `ls dist` ; do zip -d dist/$i > dist/$i.zip ; done"
}
}
build apps
npm run build
package apps
npm run zip
test archives
unzip dist/electron-tutorial-app-darwin-x64.zip -d dist/app
git add .
git commit -am ...
npm version patch
#npm version patch -m "Message..."
git push origin --tags
perform using github-release.sh script
GITHUB_TOKEN=abcd123... ./github-release.sh "Message..."
## or:
# ./github-release.sh "Message..." abcd123...