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

feat: name and description parameters for npx cap add electron #2604

Closed
1 of 4 tasks
mandolyte opened this issue Mar 19, 2020 · 3 comments · Fixed by #2741
Closed
1 of 4 tasks

feat: name and description parameters for npx cap add electron #2604

mandolyte opened this issue Mar 19, 2020 · 3 comments · Fixed by #2741

Comments

@mandolyte
Copy link

mandolyte commented Mar 19, 2020

Feature Request

Describe the Feature Request

When the command is run, it creates a package.json with hard-coded values for name and description:

$ cat package.json 
{
  "name": "capacitor-app",
  "version": "1.0.0",
  "description": "An Amazing Capacitor App",
... elided ...

And when the packager is run, it generates folders based on the “name” value. This is a request for arguments to set these values so that they don’t have to be edited by hand (or sed in a Github Action).

So something like:
npx cap add electron --name "myApp" --description "A bit of description"

Thanks for your consideration.

Platform Support Requested

  • Android
  • iOS
  • Electron
  • Web

Describe Preferred Solution

Describe Alternatives

Related Code

Note the --web_dir argument for npx cap init is similar in spirit.

Additional Context

@mandolyte
Copy link
Author

Some notes...

  1. The package.json appears to copied here
  2. The source shows a similar problem solved for Android by an update function to the copied data here

A similar solution may work for electron... as long as we can access the argument values provided by the user.

@jcesarmobile
Copy link
Member

For the name, it should use the name on capacitor.config.json, so that's a bug.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 12, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants