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

Add basename option #1478

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function sanitizeAppName (name) {
}

function generateFinalBasename (opts) {
return `${sanitizeAppName(opts.name)}-${opts.platform}-${opts.arch}`
return `${sanitizeAppName(opts.basename || opts.name)}-${opts.platform}-${opts.arch}`
}

function generateFinalPath (opts) {
Expand Down
8 changes: 8 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ declare namespace electronPackager {
* **Note:** `junk` will have no effect if the {@link prebuiltAsar} option is set.
*/
junk?: boolean;
/**
* The base folder ${basename}-${platform}-${arch}. If omitted, it will use the `productName` or `name` value from the
* nearest `package.json`.
*
* **Regardless of source, characters in the Electron app name which are not allowed in all target
* platforms' filenames (e.g., `/`), will be replaced by hyphens (`-`).**
*/
basename?: string;
/**
* The application name. If omitted, it will use the `productName` or `name` value from the
* nearest `package.json`.
Expand Down