Issue
I have an Ionic React Project created with Ionic Cli ionic start
using the blank
template.
How can I set the project's version that I see in the package.json
file?
Is that sufficient? Is there any place that I should write the version as well? E.g.: tsconfig.json
, ionic.config.json
?
Can npm run build
do that, like having some sort of version argument? Or do I need to make a script that parses those JSON files?
Solution
If you're using this project solely for web, then the package.json version is enough. And if you want to display it inside your app, you can do it like this (bottom left corner):
you can do the following:
import packageJson from "../../../package.json";
packageJson.version
If you're planning to change the version of any platform (android - ios - etc...) you will have to do that manually for each incremental version inside a configuration file specific for each platform (ex: for Android it's build.gradle file)
Answered By - Ibrahim Awad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.