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: load app name from capacitor.config.{json,js,ts} #469

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

johannschopplich
Copy link

As of right now, the app name for the to-be-generated ionic.config.json is derived from the local package.json. This results in the following appName:

// ionic.config.json
{
  "name": "my-app",
}

But the official Ionic configuration recommends:

// ionic.config.json
{
  // The human-readable name of the app.
  "name": "My App"
}

I believe a better approach is to use any of the existing Capacitor configs, as it includes the to be published app name:

  • capacitor.config.json
  • capacitor.config.ts
  • etc.

Since a valid name for a package.json isn't allowed to include uppercase letters, the Capacitor config holds the more appropriate app name.

@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for friendly-lamington-fb5690 canceled.

Name Link
🔨 Latest commit 24d9840
🔍 Latest deploy log https://app.netlify.com/sites/friendly-lamington-fb5690/deploys/653a977d7e100000083ad015

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #469 (6fc64e7) into main (701478a) will decrease coverage by 1.79%.
Report is 1 commits behind head on main.
The diff coverage is 11.11%.

❗ Current head 6fc64e7 differs from pull request most recent head 24d9840. Consider uploading reports for the commit 24d9840 to get more accurate results

@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
- Coverage   83.36%   81.58%   -1.79%     
==========================================
  Files           9        9              
  Lines         493      505      +12     
  Branches       30       30              
==========================================
+ Hits          411      412       +1     
- Misses         82       93      +11     
Files Coverage Δ
src/module.ts 71.00% <11.11%> (-3.33%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines +137 to +139
capacitor: {},
},
type: 'vue-vite',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these changes to the written file definitely correct, bearing in mind the user might not use capacitor? And I'm not sure vue-vite is right:

To support this, we’ve introduced a new project type in the ionic.config.json, vue-vite and react-vite. These new project types will tell the CLI that it should call Vite when you run ionic serve or ionic build.
https://ionic.io/blog/ionic-cli-v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants