npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cap-set-version-from-package

v2.0.1

Published

cap-set-version-from-package is a simple CLI for updating Android or iOS version with package.json version

Downloads

48

Readme

NPM npm GitHub code size in bytes Snyk Vulnerabilities for npm scoped package

cap-set-version-from-package CLI is a simple utility for updating your Android or iOS build no. and version by using package.json while creating Android or iOS App using Capacitor. Very Useful in Github action for capacitor.

Usage

To Install

npm install cap-set-version-from-package

Install it in your capacitor/ionic project

To Use

To use this package just use the below command

cap-set-version-from-package

# OR use short form
csvfp

If you are using npx then no need to install, directly use this

npx  cap-set-version-from-package

Pre Requires

You must have package.json file with update version. You may have android or ios directory added to your capacitor project using:

# to install capacitor Android dependency
npm install @capacitor/android @capacitor/android

# to add Android directory
npx cap add android

# to add ios directory
npx cap add ios

# to clone your dist to android
npx cap sync

Incase if any directory is missing, still it will work on existing directory with a WARNING. Once done. Now you are ready to use cap-set-version-from-package

Customise Your Versioning

Using Custom Android Path

If Android folder is getting created or available in custom location.

npm

cap-set-version-from-package  --androidPath=../Project2/android

# OR use short form
csvfp  -a=../Project2/android

npx

npx cap-set-version-from-package  -a=../Project2/android

Using Custom ios Path

If ios folder is getting created or available in custom location.

npm

cap-set-version-from-package  --iosPath=../Project2/ios

# OR use short form
csvfp  -i=../Project2/android

npx

npx cap-set-version-from-package  -i=../Project2/ios

Using Custom package.json / custom.json file Path

If package.json is available in custom location or you want use some custom json file.

npm

cap-set-version-from-package  --jsonPath=./Project2/custom.json

# OR use short form
csvfp  -j=./Project2/custom.json

npx

npx cap-set-version-from-package  --jsonPath=../Project2/package.json

Find value of custom version key inside package.json or custom.json

If custom json file contain custom key which contains version.

npm

cap-set-version-from-package  --versionKey=proj-version

# OR use short form
csvfp -k=proj-version

npx

npx cap-set-version-from-package -j=./Project2/custom.json -k=versionName

For developers and contibuters

To install package

npm install

To use locally in system

npm i -g

To remove it locally

npm rm -g

Author

New Feature

  • Versioning iOS build.
  • Customization for iOS build versioning.

Coming Soon

  • Picking paths from capacitor.config.json.