Skip to content

Commit

Permalink
autowidth for better readability
Browse files Browse the repository at this point in the history
update relative links to new folder `pages` structure
add additional readme intro
fixing links
  • Loading branch information
mmaietta committed Sep 17, 2024
1 parent e274206 commit d2ea966
Show file tree
Hide file tree
Showing 58 changed files with 367 additions and 630 deletions.
66 changes: 62 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ will declare to use node-modules instead of PnP.

[electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) is a recommended way to create a new Electron application. See [Boilerplates](https://www.electron.build/#boilerplates).

1. Specify the standard fields in the application `package.json`[name](https://electron.build/configuration/configuration#Metadata-name), `description`, `version` and [author](https://docs.npmjs.com/files/package.json#people-fields-author-contributors).
1. Specify the standard fields in the application `package.json`[name](https://electron.build./configuration.md#Metadata-name), `description`, `version` and [author](https://docs.npmjs.com/files/package.json#people-fields-author-contributors).

2. Specify the [build](https://electron.build/configuration/configuration#build) configuration in the `package.json` as follows:
2. Specify the [build](https://electron.build./configuration.md#build) configuration in the `package.json` as follows:
```json
"build": {
"appId": "your.id",
Expand All @@ -156,12 +156,70 @@ will declare to use node-modules instead of PnP.

To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps"` to your `package.json`.

5. If you have native addons of your own that are part of the application (not as a dependency), set [nodeGypRebuild](https://www.electron.build/configuration/configuration#Configuration-nodeGypRebuild) to `true`.
5. If you have native addons of your own that are part of the application (not as a dependency), set [nodeGypRebuild](https://www.electron.build./configuration.md#Configuration-nodeGypRebuild) to `true`.

Please note that everything is packaged into an asar archive [by default](https://electron.build/configuration/configuration#Configuration-asar).
Please note that everything is packaged into an asar archive [by default](https://electron.build./configuration.md#Configuration-asar).

For an app that will be shipped to production, you should sign your application. See [Where to buy code signing certificates](https://www.electron.build/code-signing#where-to-buy-code-signing-certificate).

## Programmatic Usage
See `node_modules/electron-builder/out/index.d.ts`. Typings for TypeScript are provided and also can be found [here](/api/electron-builder.md).

Code snippit provided below is also shown "in action" [here](/api/programmatic-usage.md) as well.
```js
"use strict"

const builder = require("electron-builder")
const Platform = builder.Platform

// Promise is returned
builder.build({
targets: Platform.MAC.createTarget(),
config: {
"//": "build options, see https://goo.gl/QQXmcV"
}
})
.then(() => {
// handle result
})
.catch((error) => {
// handle error
})
```

## Boilerplates

* [electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) — A bare minimum project structure to get started developing with [electron-webpack](https://github.com/electron-userland/electron-webpack). Recommended.
* [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) A boilerplate for scalable cross-platform desktop apps.
* [electron-react-redux-boilerplate](https://github.com/jschr/electron-react-redux-boilerplate) A minimal boilerplate to get started with Electron, React and Redux.
* [electron-boilerplate](https://github.com/szwacz/electron-boilerplate) A minimalistic yet comprehensive boilerplate application.
* [Vue CLI 3 plugin for Electron](https://nklayman.github.io/vue-cli-plugin-electron-builder) A Vue CLI 3 plugin for Electron with no required configuration.
* [electron-vue-vite](https://github.com/caoxiemeihao/electron-vue-vite) A real simple Electron + Vue3 + Vite5 boilerplate.
* [vite-electron-builder](https://github.com/cawa-93/vite-electron-builder) Secure boilerplate for Electron app based on Vite. TypeScript + Vue/React/Angular/Svelte/Vanilla

## Debug

Set the `DEBUG` environment variable to debug what electron-builder is doing:
```bash
DEBUG=electron-builder
```

`FPM_DEBUG` env to add more details about building linux targets (except snap and appimage).

`DEBUG_DMG=true` env var to add more debugging/verbosity from `hdiutil` (macOS).

!!! tip "cmd"
On [Windows](https://github.com/visionmedia/debug#windows-command-prompt-notes) the environment variable is set using the set command.
```bash
set DEBUG=electron-builder
```

!!! tip "PowerShell"
PowerShell uses different syntax to set environment variables.
```bash
$env:DEBUG=electron-builder
```

## Donate

We do this open source work in our free time. If you'd like us to invest more time on it, please [donate](https://www.electron.build/donate).
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
site_name: electron-builder
site_url: https://www.electron.build
use_directory_urls: false
extra_css:
- stylesheets/autowidth.css
theme:
feature:
tabs: true
Expand Down Expand Up @@ -50,7 +52,7 @@ plugins:
# recursive: true

nav:
- Introduction: index.md
- Introduction: README.md
- Command Line Interface (CLI): cli.md
- Programmatic API:
- API: api/electron-builder.md
Expand Down
3 changes: 1 addition & 2 deletions netlify-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ pipenv install
echo "Installing deps"
pnpm install
echo "Building site docs"
pnpm compile
node scripts/renderer/out/typedoc2html.js
pnpm docs:build
mkdocs build
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
"docker-push": "docker/push.sh",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"generate-changeset": "pnpm changeset",
"generate-docs": "pnpm compile && pnpm jsdoc && pnpm jsdoc2md2html",
"generate-schema": "typescript-json-schema packages/app-builder-lib/tsconfig-scheme.json Configuration --out packages/app-builder-lib/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --required && node ./scripts/fix-schema.js",
"generate-all": "pnpm generate-schema && pnpm generate-docs && pnpm prettier",
"generate-all": "pnpm generate-schema && pnpm prettier",
"ci:test": "node ./test/out/helpers/runTests.js",
"ci:version": "pnpm i && pnpm changelog && changeset version && node scripts/update-package-version-export.js && pnpm compile && pnpm generate-all && git add .",
"ci:publish": "pnpm i && pnpm compile && pnpm publish -r --tag next && changeset tag",
"docs:prebuild": "docker build -t mkdocs-dockerfile -f mkdocs-dockerfile . ",
"docs:build": "node scripts/renderer/out/src/typedoc2html.js && docker run --rm -v ${PWD}:/docs -v ${PWD}/site:/site mkdocs-dockerfile build",
"docs:build": "pnpm compile && node scripts/renderer/out/typedoc2html.js",
"docs:mkdocs": "docker run --rm -v ${PWD}:/docs -v ${PWD}/site:/site mkdocs-dockerfile build",
"docs:all": "pnpm docs:prebuild && pnpm docs:build && pnpm docs:mkdocs",
"prepare": "husky install"
},
"//": "repository must be specified otherwise conventional-changelog will use forked repo (currently cloned)",
Expand Down
Loading

0 comments on commit d2ea966

Please sign in to comment.