forked from electron-userland/electron-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): Updating/migrating docs branch and automating docs deplo…
…yment (electron-userland#6221)
- Loading branch information
Showing
67 changed files
with
7,367 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
--- | ||
|
||
chore(docs): Updating/migrating docs branch and automating docs deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,19 +61,13 @@ our git [commit messages can be formatted](https://gist.github.com/develar/273e2 | |
|
||
## Documentation | ||
|
||
To avoid Google indexing, documentation files located in the branch `docs`. To clone: | ||
|
||
```shell script | ||
git clone --single-branch -b docs [email protected]:electron-userland/electron-builder.git docs | ||
``` | ||
|
||
Documentation files located in the `/docs`. | ||
|
||
`/docs` is deployed to Netlify when `next` release is marked as `latest` and available for all users. | ||
`/docs` is deployed to Netlify on every release and available for all users. | ||
|
||
`pip3 install mkdocs-material mkdocs markdown-include pymdown-extensions pygments --upgrade` | ||
`bash netlify-docs.sh` to setup local env (Python 3) and build. | ||
|
||
You'll want to copy the `mkdocs.yml` file from the master branch and then run `mkdocs build`. | ||
Build command: `mkdocs build`. | ||
|
||
## Debug Tests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
mkdocs-material = "*" | ||
mkdocs = "*" | ||
markdown-include = "*" | ||
pymdown-extensions = "*" | ||
pygments = "*" | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/publishing-artifacts /configuration/publish | ||
/configuration/linux-other /configuration/linux | ||
/configuration/deb /configuration/linux | ||
/docker /multi-platform-build | ||
/configuration/target /cli |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
``` | ||
"use strict" | ||
const builder = require("electron-builder") | ||
const Platform = builder.Platform | ||
// Let's get that intellisense working | ||
/** | ||
* @type {import('electron-builder').Configuration} | ||
* @see https://www.electron.build/configuration/configuration | ||
*/ | ||
const options = { | ||
protocols: { | ||
name: "Deeplink Example", | ||
// Don't forget to set `MimeType: "x-scheme-handler/deeplink"` for `linux.desktop` entry! | ||
schemes: [ | ||
"deeplink" | ||
] | ||
}, | ||
// "store” | “normal” | "maximum". - For testing builds, use 'store' to reduce build time significantly. | ||
compression: "normal", | ||
removePackageScripts: true, | ||
afterSign: async (context) => { | ||
// Mac releases require hardening+notarization: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution | ||
if (!isDebug && context.electronPlatformName === "darwin") { | ||
await notarizeMac(context) | ||
} | ||
}, | ||
artifactBuildStarted: (context) => { | ||
identifyLinuxPackage(context) | ||
}, | ||
afterAllArtifactBuild: (buildResult) => { | ||
return stampArtifacts(buildResult) | ||
}, | ||
// force arch build if using electron-rebuild | ||
beforeBuild: async (context) => { | ||
const { appDir, electronVersion, arch } = context | ||
await electronRebuild.rebuild({ buildPath: appDir, electronVersion, arch }) | ||
return false | ||
}, | ||
nodeGypRebuild: false, | ||
buildDependenciesFromSource: false, | ||
directories: { | ||
output: "dist/artifacts/local", | ||
buildResources: "installer/resources" | ||
}, | ||
files: [ | ||
"out" | ||
], | ||
extraFiles: [ | ||
{ | ||
from: "build/Release", | ||
to: nodeAddonDir, | ||
filter: "*.node" | ||
} | ||
], | ||
win: { | ||
target: 'nsis' | ||
}, | ||
nsis: { | ||
deleteAppDataOnUninstall: true, | ||
include: "installer/win/nsis-installer.nsh" | ||
}, | ||
mac: { | ||
target: 'dmg', | ||
hardenedRuntime: true, | ||
gatekeeperAssess: true, | ||
extendInfo: { | ||
NSAppleEventsUsageDescription: 'Let me use Apple Events.', | ||
NSCameraUsageDescription: 'Let me use the camera.', | ||
NSScreenCaptureDescription: 'Let me take screenshots.', | ||
} | ||
}, | ||
dmg: { | ||
background: "installer/mac/dmg-background.png", | ||
iconSize: 100, | ||
contents: [ | ||
{ | ||
x: 255, | ||
y: 85, | ||
type: "file" | ||
}, | ||
{ | ||
x: 253, | ||
y: 325, | ||
type: "link", | ||
path: "/Applications" | ||
} | ||
], | ||
window: { | ||
width: 500, | ||
height: 500 | ||
} | ||
}, | ||
linux: { | ||
desktop: { | ||
StartupNotify: "false", | ||
Encoding: "UTF-8", | ||
MimeType: "x-scheme-handler/deeplink" | ||
}, | ||
target: ["AppImage", "rpm", "deb"] | ||
}, | ||
deb: { | ||
priority: "optional", | ||
afterInstall:"installer/linux/after-install.tpl", | ||
}, | ||
rpm: { | ||
fpm: ["--before-install", "installer/linux/before-install.tpl"], | ||
afterInstall:"installer/linux/after-install.tpl", | ||
} | ||
}; | ||
// Promise is returned | ||
builder.build({ | ||
targets: Platform.MAC.createTarget(), | ||
config: options | ||
}) | ||
.then((result) => { | ||
console.log(JSON.stringify(result)) | ||
}) | ||
.catch((error) => { | ||
console.error(error) | ||
}) | ||
``` |
Oops, something went wrong.