question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Override `name` from package.json

See original GitHub issue
  • Version: 22.3.3

  • Target: Linux/deb

The app name and name of deb (and other Linux) artifacts use the name key from package.json. Is there a way to override the name? If not, consider adding an option for it. Suggesting adding a new field build.name which can default to name.

My use case is I work in a monorepo (using yarn workspaces). I currently use pkg/app/package.json and name: app for my Electron package. If I were to change to name: <app name> (1) it risks collisions with other packages (either third party or my other packages) and (2) it dictates my project directory structure (I need to change the name of the pkg/app directory).

I’m happy to contribute a PR if a maintainer pre-approves the change.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

8reactions
jwonderlycommented, Jun 11, 2020

Can you use the extraMetadata property?

extraMetadata any - Inject properties to package.json

https://www.electron.build/configuration/configuration

1reaction
klren0312commented, Feb 26, 2021

Can you use the extraMetadata property?

extraMetadata any - Inject properties to package.json

https://www.electron.build/configuration/configuration

it works, thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I change a the name property in package.json?
Just change the name in package.json file. Changes to the package should come along with changes to ...
Read more >
package.json - npm Docs
Overrides provide a way to replace a package in your dependency tree with another version, or another package entirely. These changes can be...
Read more >
How to override your dependency's dependencies (Node.js)
You can now specify an overrides property in your package.json to override and enforce nested dependency versions.
Read more >
package.json | pnpm
To override a field, add the publish version of the field to publishConfig . For instance, the following package.json : { "name": "foo",...
Read more >
package.json
Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found