npm-cordova-version-sync
v1.1.0
Published
Sync you npm and cordova versions auto matically![D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[C[C[C[C[
Downloads
1
Readme
NPM Cordova Version Sync
I made this script so that each time your npm version changes in your project you can have the same version reflected in you config.xml
.
Set up
npm install npm-cordova-version-sync -g
cd /path/to/project
ncvs init
And that is it! The script will insert a command to run automatically when you version your project via npm!
Manually running the script
If you don't want to run this automatically you can run the following command to copy the version number found in your package.json
into your config.xml
.
ncvs version
Additional options
You may want to change what ncvs init
places automatically into your project. This is useful if your files are not in the root of your project.
- packageLocation : path to your
package.json
(default: 'package.json') - configXmlLocation : path to you
config.xml
(default: 'config.xml') - jsonSpacing : number of spaces used for formatting your
package.json
(default: 2)
Example:
ncvs version --packageLocation=app/package.json --configXmlLocation=app/package.json --jsonSpacing=4